ActiveSeriesCount Property

Returns the number of series that appear on a chart based on the number of columns in the DataGrid object and the type of chart being drawn.

Syntax

object.ActiveSeriesCount

The object placeholder represents an object expression that evaluates to an object in the Applies To list.


AxisTitle Property

Returns a reference to an AxisTitle object associated with the axis of a chart.

Syntax

object.AxisTitle

The object placeholder represents an object expression that evaluates to an object in the Applies To list.


SeriesCollection Property

Returns a reference to a SeriesCollection collection that provides information about the series that make up a chart.

Syntax

object.SeriesCollection

The object placeholder represents an object expression that evaluates to an object in the Applies To list.


AllowDithering Property

Returns or sets a value that determines whether to disable color dithering for charts on 8-bit color monitors in order to enable use of MSChart control's own color palette and enhance the chart display.

Syntax

object.AllowDithering [ =boolean]

The AllowDithering property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
boolean	A Boolean expression that specifies whether a color dithering is allowed, as described in Settings.
Settings

The settings for boolean are:

Setting	Description
True	Color dithering is allowed.
False	MSChart control's color palette is used for enhanced color matching and display.


AllowDynamicRotation Property

Returns or sets a value that indicates whether users can interactively rotate three-dimensional charts by holding down the control key to display the rotation cursor.

Syntax

object.AllowDynamicRotation [ = boolean]

The AllowDynamicRotation property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
boolean	A Boolean expression that specifies whether a dynamic rotation is allowed, as described in Settings.
Settings

The settings for boolean are:

Setting	Description
True	The user can interactively rotate the chart with the cursor.
False	The user cannot interactively rotate the chart with the cursor.


AllowSelections Property

Returns or sets a value that Indicates whether or not users can select chart objects.

Syntax

object.AllowSelections [ = boolean]

The AllowSelections property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
boolean	A Boolean expression that specifies whether selections can be made, as described in Settings.
Settings

The settings for boolean are:

Setting	Description
True	The user can interactively select chart objects.
False	The user cannot select chart objects.


AllowSeriesSelection Property

Returns or sets a value that indicates whether a series is selected when a user clicks on an individual chart data point.

Syntax

object.AllowSeriesSelection [ = boolean]

The AllowSeriesSelection property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
boolean	A Boolean expression that specifies whether series are selected, as described in Settings.
Settings

The settings for boolean are:

Setting	Description
True	Users can select a series by clicking a data point.
False	Clicking a data point selects just that data point, not the entire series.


AngleUnits Constants

VtAngleUnits provides the valid units for measuring chart angles.

Constants	Description
VtAngleUnitsDegrees	Chart angles are measured in degrees.
VtAngleUnitsRadians	Chart angles are measured in radians.
VtAngleUnitsGrads	Chart angles are measured in grads.


AutoIncrement Property

Returns or sets a value that determines if the properties that set the current data point are incremented during data entry without manually setting the Column and Row properties.

Syntax

object.AutoIncrement [ = boolean]

The AutoIncrement property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
boolean	A Boolean expression that specifies whether the current data point is incremented, as described in Settings.
Settings

The settings for boolean are:

Setting	Description
True	When the Data property is changed, the Row property updates to the next row in the column. If you are at the end of a column, the Column property increments to the next column.
False	The current data point is not incremented.


Axis Property

Returns a reference to an Axis object that describes an axis on a chart.

Syntax

object.Axis

The Axis property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
axisID	A VtChAxisId constant that identifies a specific axis.
index	Reserved for future use. Identifies the specific axis when there is more than one axis with the same axisID.


Axis Object

An axis on a chart.

Syntax

Axis ( axisID, index )

The Axis object syntax has these parts:

Part	Description
axisID	A VtChAxisId constant that identifies a specific axis.
index	Reserved for future use. Identifies the specific axis when there is more than one axis with the same axisID.


LabelLevelCount Property

Returns or sets the number of levels of labels for a given axis.

Syntax

object.LabelLevelCount [= count]

The LabelLevelCount property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
count	Integer. An integer that describes the number of labels.


Axis Object Example

The following example reads the number of label levels present on the x axis using the x Axis object.

Private Sub Command1_Click()

Dim XAxis As Object

Dim NumberOfLevels As Integer

' Read the number of label level present on the X

' Axis.

Set XAxis = MSChart1.Plot.Axis(VtChAxisIdX, 1)

NumberOfLevels = XAxis.LabelLevelCount

MsgBox "Number of Label Levels = " _

& Str(NumberOfLevels)

End Sub


AxisActivated Event

Occurs when the user double clicks on a chart axis.

Syntax

Private Sub object_AxisActivated ( axisId As Integer, axisIndex As Integer, mouseFlag As Integer, cancel As Integer )

The AxisActivated event syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
axisId	Integer. An integer that identifies a specific axis, as described in Settings.
axisIndex	Integer. An integer reserved for future use. For this version of MSChart control, 1 is the only valid value for this argument.
mouseFlag	Integer. An integer that indicates whether a key is held down when the mouse button is clicked, as described in Settings.
cancel	Integer. An integer that is not used at this time.
Settings

The event handler determines which axis is activated and sets axisId to:

Constants	Description
VtChAxisIdX	If the x axis is affected.
VtChAxisIdY	If the y axis is affected.
VtChAxisIdY2	If the secondary y axis is affected.
VtChAxisIdZ	If the z axis is affected.
The event handler determines if a key is held down when the mouse button is clicked and sets mouseFlag to:

Constants	Description
VtChMouseFlagShiftKeyDown	If the SHIFT key is held down.
VtChMouseFlagControlKeyDown	If the CONTROL key is held down.


AxisGrid Property

Returns a reference to an AxisGrid object that describes the planar area surrounding a chart axis.

Syntax

object.AxisGrid

The object placeholder represents an object expression that evaluates to an object in the Applies To list.


AxisGrid Object

The planar area surrounding a chart axis.

Syntax

AxisGrid


MajorPen Property

Returns a reference to a Pen object that describes the appearance of the major axis grid lines.

Syntax

object.MajorPen

The object placeholder represents an object expression that evaluates to an object in the Applies To list.


MinorPen Property

Returns a reference to a Pen object that describes the appearance of the minor axis grid lines.

Syntax

object.MinorPen

The object placeholder represents an object expression that evaluates to an object in the Applies To list.


AxisGrid Object Example

The following example changes the x AxisGrid line style to dashed.

Private Sub Command1_Click()

' Changes Grid line style to dashed.

With MSChart1.Plot.Axis(VtChAxisIdX).AxisGrid

.MajorPen.Style = VtPenStyleDashed

.MajorPen.VtColor.Set 255, 0, 0

End With

End Sub


AxisId Constants

The VtChAxisId constants provide options for identifying a chart axis.

Constants	Description
VtChAxisIdX	Identifies the x axis.
VtChAxisIdY	Identifies the y axis.
VtChAxisIdY2	Identifies the secondary y axis.
VtChAxisIdZ	Identifies the z axis.


AxisLabelActivated Event

Occurs when the user double clicks on an axis label.

Syntax

Private Sub object_AxisLabelActivated ( axisId As Integer, axisIndex As Integer, labelSetIndex As Integer, labelIndex As Integer, mouseFlag As Integer, cancel As Integer )

The AxisLabelActivated event syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
axisId	Integer. An integer that identifies a specific axis, as described in Settings.
axisIndex	Integer. An integer reserved for future use. For this version of MSChart control, 1 is the only valid value for this argument.
labelSetIndex	Integer. An integer that identifies the level of labels you are double clicking on. Levels of labels are numbered from the axis out, beginning with 1.
labelIndex	Integer. An integer that is currently unused.
mouseFlag	Integer. An integer that indicates if a key is held down when the mouse button is clicked.
cancel	Integer. An integer that is not used at this time.
Settings

The event handler determines which axis label is activated and sets axisId to:

Constants	Description
VtChAxisIdX	If the x axis is affected.
VtChAxisIdY	If the y axis is affected.
VtChAxisIdY2	If the secondary y axis is affected.
VtChAxisIdZ	If the z axis is affected.
The event handler determines if a key is held down when the mouse button is clicked and sets mouseFlag to:

Constants	Description
VtChMouseFlagShiftKeyDown	If the SHIFT key is held down.
VtChMouseFlagControlKeyDown	If the CONTROL key is held down.


AxisLabelSelected Event

Occurs when the user clicks an axis label.

Syntax

Private Sub object_AxisLabelSelected ( axisId As Integer, axisIndex As Integer, labelSetIndex As Integer, labelIndex As Integer, mouseFlag As Integer, cancel As Integer )

The AxisLabelSelected event syntax has these parts.

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
axisId	Integer. An integer that identifies a specific axis, as described in Settings.
axisIndex	Integer. An integer reserved for future use. For this version of MSChart control, 1 is the only valid value for this argument.
labelSetIndex	Integer. An integer that identifies the level of labels you are double clicking on. Levels of labels are numbered from the axis out, beginning with 1.
labelIndex	Integer. An integer that is currently unused.
mouseFlag	Integer. An integer that indicates if a key is held down when the mouse button is clicked, as described in Settings.
cancel	Integer. An integer that is not used at this time.
Settings

The event handler determines which axis label is selected and sets axisId to:

Constants	Description
VtChAxisIdX	If the x axis is affected.
VtChAxisIdY	If the y axis is affected.
VtChAxisIdY2	If the secondary y axis is affected.
VtChAxisIdZ	If the z axis is affected.
The event handler determines if a key is held down when the mouse button is clicked and sets mouseFlag to:

Constants	Description
VtChMouseFlagShiftKeyDown	If the SHIFT key is held down.
VtChMouseFlagControlKeyDown	If the CONTROL key is held down.


AxisLabelUpdated Event

Occurs when an axis label has changed.

Syntax

Private Sub object_AxisLabelUpdated (axisId As Integer, axisIndex As Integer, labelSetIndex As Integer, labelIndex As Integer, updateFlags As Integer)

The AxisLabelUpdated event syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
axisId	Integer. An integer that identifies a specific axis, as described in Settings.
axisIndex	Integer. An integer reserved for future use. For this version of MSChart control, 1 is the only valid value for this argument.
labelSetIndex	Integer. An integer that identifies the level of labels you are double clicking on. Levels of labels are numbered from the axis out, beginning with 1.
labelIndex	Integer. An integer that is currently unused.
updateFlags	Integer. An integer provides information about the update of the label, as described in Settings.
Settings

The event handler determines which axis label is updated and sets axisId to:

Constants	Description
VtChAxisIdX	If the x axis is affected.
VtChAxisIdY	If the y axis is affected.
VtChAxisIdY2	If the secondary y axis is affected.
VtChAxisIdZ	If the z axis is affected.
The event handler determines the affect of the update, and sets updateFlag to:

Constants	Description
VtChNoDisplay	Absence of update flags; the chart display is not affected. (Defined as 0.)
VtChDisplayPlot	Update will cause the plot to repaint.
VtChLayoutPlot	Update will cause the plot to lay out.
VtChDisplayLegend	Update will cause the legend to repaint.
VtChLayoutLegend	Update will cause the legend to lay out.
VtChLayoutSeries	Update will cause the series to lay out.
VtChPositionSection	A chart section has been moved or resized.


AxisScale Property

Returns a reference to an AxisScale object that describes how chart values are plotted on an axis.

Syntax

object.AxisScale


AxisScale Object

Controls how chart values are plotted on an axis.

Syntax

AxisScale


Hide Property

Returns or sets a value that determines whether the axis on a chart is hidden.

Syntax

object.Hide [ = boolean]

The Hide property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
boolean	A Boolean expression that specifies whether the axis is hidden, as described in Settings.
Settings

The settings for boolean are:

Setting	Description
True	The axis scale, line, ticks and title are hidden.
False	The axis appears on the chart.


LogBase Property

Returns or sets the logarithm base used to plot chart values on a logarithmic axis.

Syntax

object.LogBase [ = base]

The LogBase property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
base	Integer. An integer that identifies the logarithm base. The default base is 10. The valid range is 2 to 100.
Remarks

The axis type is controlled by the Type property.


PercentBasis Property

Returns or sets the type of percentage used to plot chart values on a percent axis.

Syntax

object.PercentBasis [ = type ]

The PercentBasis property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
type	A VtChPercentAxisBasis constant used to describe the percentage used to plot percent axis values.
Remarks

The axis type is controlled by the Type property.


Type Property (MSChart)

Returns or sets the scale type of an axis.

Syntax

object.Type [ = type]

The Type property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
type	A VtChScaleType constant describing the axis scale type.


AxisScale Example

The following example sets the x and y axes to percent scale for a two-dimensional line chart.

Private Sub Command1_Click()

' Change both x and y axes to Percent scale for 2D

' Line chart.

Form1.MSChart1.ChartType = VtChChartType2dLine

For AxisId = VtChAxisIdX To VtChAxisIdY

With Form1.MSChart1.Plot.Axis(AxisId).AxisScale

.Type = VtChScaleTypePercent

.PercentBasis = VtChPercentAxisBasisSumChart

End With

Next

End Sub


AxisSelected Event

Occurs when the user clicks on a chart axis.

Syntax

Private Sub object_AxisSelected (axisId As Integer, axisIndex As Integer, mouseFlag As Integer, cancel As Integer )

The AxisSelected event syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
axisId	Integer. An integer that identifies a specific axis, as described in Settings.
AxisIndex	Integer. An integer reserved for future use. For this version of MSChart control, 1 is the only valid value for this argument.
mouseFlag	Integer. An integer that indicates whether key is held down when the mouse button is clicked, as described in Settings.
cancel	Integer. An integer that is not used at this time.
Settings

The event handler determines which axis is selected and sets axisId to:

Constants	Description
VtChAxisIdX	If the x axis is affected.
VtChAxisIdY	If the y axis is affected.
VtChAxisIdY2	If the secondary y axis is affected.
VtChAxisIdZ	If the z axis is affected.
The event handler determines if a key is held down when the mouse button is clicked and sets mouseFlag to:

Constants	Description
VtChMouseFlagShiftKeyDown	If the SHIFT key is held down.
VtChMouseFlagControlKeyDown	If the CONTROL key is held down.


AxisTickStyle Constants

The VtChAxisTickStyle constants provide options for indicating axis tick mark location.

Constants	Description
VtChAxisTickStyleNone	No tick marks are displayed on the axis.
VtChAxisTickStyleCenter	Tick marks are centered across the axis.
VtChAxisTickStyleInside	Tick marks are displayed inside the axis.
VtChAxisTickStyleOutside	Tick marks are displayed outside the axis.


AxisTitle Object

An axis title on a chart.

Syntax

AxisTitle


Text Property (MSChart)

Returns or sets the text used to display a chart element such as an axis title, data point label, footnote, or chart title.

Syntax

object.Text [ = text ]

The Text property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
text	String. A string that contains the text used for the chart element.
Remarks

The Text property is the default property for each of the objects to which it applies.


TextLength Property

Returns or sets the number of characters in the text of a chart axis title, data point label, footnote, or chart title.

Syntax

object.TextLength [ = size]

The TextLength property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
size	Integer. The number of characters in the text.


Visible Property (MSChart)

Returns or sets a value that determines whether a chart element is displayed.

Syntax

object.Visible [ = boolean]

The Visible property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
boolean	A Boolean expression that specifies whether the item is displayed, as described in Settings.
Settings

The settings for boolean are:

Setting	Description
True	The chart, axis title, label, or marker are displayed.
False	The elements are hidden.


AxisTitle Object Example

The following example makes the axis title visible for all axes of a three-dimensional chart.

Private Sub Command1_Click()

' Makes Axis title visible for all axes of a

' 3D chart.

MSChart1.chartType = VtChChartType3dBar

For axisId = VtChAxisIdX To VtChAxisIdZ

With MSChart1.Plot.axis(axisId, 1).AxisTitle

.Visible = True

Select Case axisId

Case 0

.text = "X Axis Title"

Case 1

 	.text = "Y Axis Title"

Case 2

.text = "2nd Y Axis Title"

Case 3

.text = "Z Axis Title"

End Select

End With

Next

End Sub


AxisTitleActivated Event

Occurs when the user double clicks on an axis title.

Syntax

Private Sub object_AxisTitleActivated ( axisId As Integer, axisIndex As Integer, mouseFlag As Integer, cancel As Integer )

The AxisTitleActivated event syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
axisId	Integer. An integer that identifies a specific axis.
AxisIndex	Integer. An integer reserved for future use. For this version of MSChart control, 1 is the only valid value for this argument.
mouseFlag	Integer. An integer that indicates whether a key is held down when the mouse button is clicked.
cancel	Integer. This argument is not used at this time.
Settings

The event handler determines which axis title is activated and sets axisId to:

Constants	Description
VtChAxisIdX	If the x axis is affected.
VtChAxisIdY	If the y axis is affected.
VtChAxisIdY2	If the secondary y axis is affected.
VtChAxisIdZ	If the z axis is affected.
The event handler determines if a key is held down when the mouse button is clicked and sets mouseFlag to:

Constants	Description
VtChMouseFlagShiftKeyDown	If the SHIFT key is held down.
VtChMouseFlagControlKeyDown	If the CONTROL key is held down.


AxisTitleSelected Event

Occurs when the user clicks on an axis title.

Syntax

Private Sub object_AxisTitleSelected ( axisId As Integer, axisIndex As Integer, mouseFlag As Integer, cancel As Integer )

The AxisTitleSelected event syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
axisId	Integer. An integer that identifies a specific axis.
AxisIndex	Integer. An integer reserved for future use. For this version of MSChart control, 1 is the only valid value for this argument.
mouseFlag	Integer. An integer that indicates whether a key is held down when the mouse button is clicked.
cancel	Integer. This argument is not used at this time.
Settings

The event handler determines which axis title is selected and sets axisId to:

Constants	Description
VtChAxisIdX	If the x axis is affected.
VtChAxisIdY	If the y axis is affected.
VtChAxisIdY2	If the secondary y axis is affected.
VtChAxisIdZ	If the z axis is affected.
The event handler determines if a key is held down when the mouse button is clicked and sets mouseFlag to:

Constants	Description
VtChMouseFlagShiftKeyDown	If the SHIFT key is held down.
VtChMouseFlagControlKeyDown	If the CONTROL key is held down.


AxisTitleUpdated Event

Occurs when an axis title has changed.

Syntax

Private Sub object_AxisTitleUpdated ( axisId As Integer, axisIndex As Integer, updateFlags As Integer)

The AxisTitleUpdated event syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
axisId	Integer. An integer that identifies a specific axis.
AxisIndex	Integer. An integer reserved for future use. For this version of MSChart control, 1 is the only valid value for this argument.
updateFlag	Integer. An integer that provides information about the update of the title.
Settings

The event handler determines which axis title is updated and sets axisId to:

Constants	Description
VtChAxisIdX	If the x axis is affected.
VtChAxisIdY	If the y axis is affected.
VtChAxisIdY2	If the secondary y axis is affected.
VtChAxisIdZ	If the z axis is affected.
The following table lists the constants for updateFlag.

Constants	Description
VtChNoDisplay	Absence of update flags; the chart display is not affected. (Defined as 0.)
VtChDisplayPlot	Update will cause the plot to repaint.
VtChLayoutPlot	Update will cause the plot to lay out.
VtChDisplayLegend	Update will cause the legend to repaint.
VtChLayoutLegend	Update will cause the legend to lay out.
VtChLayoutSeries	Update will cause the series to lay out.
VtChPositionSection	A chart section has been moved or resized.


AxisUpdatedEvent

Occurs when an axis has changed.

Syntax

Private Sub object_AxisUpdated ( axisId As Integer, axisIndex As Integer, updateFlags As Integer)

The AxisUpdated event syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
axisId	Integer. An integer that identifies a specific axis.
axisIndex	Integer. An integer reserved for future use. For this version of MSChart control, 1 is the only valid value for this argument.
updateFlag	Integer. An integer that provides information about the update of the axis.
Settings

The event handler determines which axis is updated and sets axisId to:

Constants	Description
VtChAxisIdX	If the x axis is affected.
VtChAxisIdY	If the y axis is affected.
VtChAxisIdY2	If the secondary y axis is affected.
VtChAxisIdZ	If the z axis is affected.
The following table lists the constants for updateFlag.

Constants	Description
VtChNoDisplay	Absence of update flags; the chart display is not affected. (Defined as 0.)
VtChDisplayPlot	Update will cause the plot to repaint.
VtChLayoutPlot	Update will cause the plot to lay out.
VtChDisplayLegend	Update will cause the legend to repaint.
VtChLayoutLegend	Update will cause the legend to lay out.
VtChLayoutSeries	Update will cause the series to lay out.
VtChPositionSection	A chart section has been moved or resized.


Backdrop Property

Returns a reference to a Backdrop object that describes the shadow, pattern, or picture behind a chart or chart element.

Syntax

object.Backdrop

The object placeholder represents an object expression that evaluates to an object in the Applies To list.


Backdrop Object

A shadow or pattern behind a chart element.

Syntax

Backdrop


BorderStyle Constants (MSChart)

The VtBorderStyle constants provide options for the type of border to be placed around the chart control.

Constant	Description
VtBorderStyleFixedSingle	A single border is placed around the chart control.
VtBorderStyleNone	No border is placed around the chart control.


Brush Property

Returns a reference to a Brush Object that describes the fill type used to display a chart element.

Syntax

object.Brush

The object placeholder represents an object expression that evaluates to an object in the Applies To list.


Brush Object

The fill type used to display a chart element.

Syntax

Brush


FillColor Property

Returns a reference to a VtColor object that describes the color used to fill a chart element.

Syntax

object.FillColor

The object placeholder represents an object expression that evaluates to an object in the Applies To list.

Remarks

If the FillColor property of the Marker object is set, then the Marker object's Visible property is automatically set to True.


Index Property (Brush)

Returns or sets the pattern or hatch used in the brush if its Style property is set to VtBrushStylePattern or VtBrushStyleHatch.

Syntax

object.Index [ = num ]

The Index property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
num	A VtBrushPattern constant or VtBrushHatch constant describing the brush pattern.


PatternColor Property

Returns a reference to a VtColor object that describes the pattern color used to fill a chart element.

Syntax

object.PatternColor

The object placeholder represents an object expression that evaluates to an object in the Applies To list.


Style Property (MSChart)

Returns or sets the style used to draw certain chart elements

Syntax

object.Style [=style]

The Style property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
style	For the Brush object, a VtBrushStyle constant describing the brush pattern. For the Fill object, a VtFillStyle constant that describes the style of fill. A fill can have a brush, which is a solid color or patterned fill. For the Frame object, a VtFrameStyle constant that describes the type of frame. For the Marker object, a VtMarkerStyle constant that lists the marker type. For the Pen object, a VtPenStyle constant that describes the style of pen. For the Shadow object, a VtShadowStyle constant used to describe the shadow type. For the Tick object, a VtChAxisTickStyle constant used to describe the axis tick position. For the VtFont object, a VtFontStyle constant describing the style of font. For the Weighting object, a VtChPieWeightStyle constant that identifies the weighting factor method.


Brush Example
Brush Object Example

The following example sets a bold vertical line pattern for the chart backdrop using the Brush object.

Private Sub Command1_Click()

' Sets Backdrop to Fill - Brush Style.

MSChart1.Backdrop.Fill.Style = VtFillStyleBrush

' Sets a pattern for the chart backdrop using the

' Brush object.

With MSChart1.Backdrop.Fill.Brush

.Style = VtBrushStylePattern

.Index = VtBrushPatternBoldVertical

' Sets Pattern to Bold Vertical lines.

.FillColor.Set 255, 0, 0	' Fill Color = Red.

.PatternColor.Set 0, 0, 255	' Pattern Color =

' Blue.

End With

End Sub


BrushStyle Constants

VtBrushStyle provides valid brush types.

Constant	Description
VtBrushStyleNull	No brush (background shows through)
VtBrushStyleSolid	Solid color brush
VtBrushStylePattern	Bitmap patterned brush
VtBrushStyleHatched	Hatched brush


BrushPatterns Constants
BrushPattern Constants

VtBrushPattern provides valid brush types if VtBrushStyle is set to VtBrushStylePattern.

Constant	Description
VtBrushPattern94percent	94 percent pattern color
VtBrushPattern88percent	88 percent pattern color
VtBrushPattern75percent	75 percent pattern color
VtBrushPattern50percent	50 percent pattern color
VtBrushPattern25percent	25 percent pattern color
VtBrushPatternBoldHorizontal	Bold horizontal lines
VtBrushPatternBoldVertical	Bold vertical lines
VtBrushPatternBoldDownDiagonal	Bold down diagonal lines
VtBrushPatternBoldUpDiagonal	Bold up diagonal lines
VtBrushPatternChecks	Checks pattern
VtBrushPatternWeave	Weave pattern
VtBrushPatternHorizontal	Horizontal lines
VtBrushPatternVertical	Vertical lines
VtBrushPatternDownDiagonal	Down diagonal lines
VtBrushPatternUpDiagonal	Up diagonal lines
VtBrushPatternGrid	Grid pattern
VtBrushPatternTrellis	Trellis pattern
VtBrushPatternInvertedTrellis	Inverted trellis pattern


BrushHatches Constants
BrushHatch Constants

VtBrushHatch provides valid brush types if VtBrushStyle is set to VtBrushStyleHatch.

Constant	Description
VtBrushHatchHorizontal	Horizontal hatch lines
VtBrushHatchVertical	Vertical hatch lines
VtBrushHatchDownDiagonal	Down diagonal hatch lines
VtBrushHatchUpDiagonal	Up diagonal hatch lines
VtBrushHatchCross	Cross hatch lines
VtBrushHatchDiagonalCross	Diagonal cross hatch lines


CategoryScale Property

Returns a reference to a CategoryScale object that describes the scale information for a category axis.

Syntax

object.CategoryScale

The object placeholder represents an object expression that evaluates to an object in the Applies To list.


CategoryScale Object

The scale for a category axis.

Syntax

CategoryScale


Auto Property (CategoryScale)

Returns or sets a value that indicates whether the axis is automatically scaled.

Syntax

object.Auto [ = boolean]

The Auto property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
boolean	A Boolean expression that specifies whether the item is displayed, as described in Settings.
Settings

The settings for boolean are:

Setting	Description
True	The axis is automatically scaled based on the data being charted.
False	The axis is not automatically scaled. Values in DivisionsPerLabel and DivisionsPerTick are used to determine the scale.


DivisionsPerLabel Property

Returns or sets the number of divisions to skip between labels.

Syntax

object.DivisionsPerLabel [ = num]

The DivisionsPerLabel property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
num	Integer. An integer representing the number of divisions.
Remarks

If this property is set, the object's Auto property is automatically set to False.


DivisionsPerTick Property

Returns or sets the number of divisions to skip between tick marks.

Syntax

object.DivisionsPerTick [ = num ]

The DivisionsPerTick property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
num	Integer. An integer representing the number of divisions.
Remarks

If this property is set, the object's Auto property is automatically set to False.


LabelTick Property

Returns or sets a value that indicates whether category axis labels are centered on an axis tick mark.

Syntax

object.LabelTicks [ = boolean]

The LabelTicks property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
boolean	A Boolean expression that specifies whether the item is displayed, as described in Settings.
Settings

The settings for boolean are:

Setting	Description
True	The labels are centered on a tick mark.
False	The labels are centered between two tick marks.
Remarks

If this property is set, the object's Auto property is automatically set to False.


CategoryScale Object Example

The following example sets the scaling attributes for a category axis.

Private Sub Command1_Click()

' Sets scaling attributes for a category axis.

MSChart1.ChartType = VtChChartType2dLine

With MSChart1.Plot.Axis(VtChAxisIdX, _

1).CategoryScale

.Auto = False	' Sets manual scaling.

.DivisionsPerLabel = 2	' Label appears every two

' divisions.

.DivisionsPerTick = 2	' Ticks appear every two

' divisions.

.LabelTick = True	' Labels displayed on top of

' Tick marks.

End With

End Sub


ChartActivated Event

Occurs when the user double clicks the Microsoft Chart control, but not on a specific element in the chart.

Syntax

Private Sub object_ChartActivated ( mouseFlag As Integer, cancel As Integer )

The ChartActivated event syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
mouseFlag	Integer. Indicates whether a key is held down when the mouse button is clicked, as described in Settings.
cancel	Integer. This argument is not used at this time.
Settings

The event handler determines if a key is held down when the mouse button is clicked and sets mouseFlag to:

Constants	Description
VtChMouseFlagShiftKeyDown	If the SHIFT key is held down.
VtChMouseFlagControlKeyDown	If the CONTROL key is held down.


ChartSelected Event

Occurs when the user clicks the Microsoft Chart control, but not on a specific element in the chart.

Syntax

Private Sub object_ChartSelected ( mouseFlag As Integer, cancel As Integer )

The ChartSelected event syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
mouseFlag	Integer. Indicates whether a key is held down when the mouse button is clicked, as described in Settings.
cancel	Integer.  This argument is not used at this time.
Settings

The event handler determines if a key is held down when the mouse button is clicked and sets mouseFlag to:

Constants	Description
VtChMouseFlagShiftKeyDown	If the SHIFT key is held down.
VtChMouseFlagControlKeyDown	If the CONTROL key is held down.


ChartType Constants

VtChChartType provides chart type options.

Constant	Description
VtChChartType3dBar	3D Bar
VtChChartType2dBar	2D Bar
VtChChartType3dLine	3D Line
VtChChartType2dLine	2D Line
VtChChartType3dArea	3D Area
VtChChartType2dArea	2D Area
VtChChartType3dStep	3D Step
VtChChartType2dStep	2D Step
VtChChartType3dCombination	3D Combination
VtChChartType2dCombination	2D Combination
VtChChartType2dPie	2D Pie
VtChChartType2dXY	2D XY


ChartUpdated Event

Occurs when the chart has changed.

Syntax

Private Sub object_ChartUpdated (updateFlags As Integer)

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
updateFlag	Integer. Provides information about the update of the chart, as described in Settings.
Settings

The following table lists the constants for updateFlag.

Constant	Description
VtChNoDisplay	Absence of update flags; the chart display is not affected. (Defined as 0.)
VtChDisplayPlot	Update will cause the plot to repaint.
VtChLayoutPlot	Update will cause the plot to lay out.
VtChDisplayLegend	Update will cause the legend to repaint.
VtChLayoutLegend	Update will cause the legend to lay out.
VtChLayoutSeries	Update will cause the series to lay out.
VtChPositionSection	A chart section has been moved or resized.


Chart3d Property

Returns a value that determines whether or not a chart is three dimensional.

Syntax

object.Chart3D

The object placeholder represents an object expression that evaluates to an object in the Applies To list.

Return Values

Setting	Description
True	The chart is a three-dimensional chart.
False	The chart is not a three-dimensional chart.


ChartData Property

Returns or sets a value that determines if the contents of an array are loaded directly into a chart data grid or if a chart is queried for data and returns an array.

Syntax

object.ChartData [ = data ]

The ChartData property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
data	Variant. A two-dimensional array that holds the data used to draw the chart.
Remarks

ChartData is the default property for the MSChart control.


ChartData Property Example

The following example uses a Visual Basic array to load the chart data grid directly:

' Declare the variant array.

Dim X(1 To 3, 1 To 3) as Variant

' Set the data.

For i = 1 To Ubound3

For j = 1 To 3

X(i,j) = i*j

Next

Next

' Set the row labels.

X(1,2) = "Wheat"

X(1,3) = "Corn"

' Set the column labels.

X(2,1) = "January"

X(3,1) = "February"

' Set the chart data.

MSChart1.ChartData = X

In this example, the lower subscript bound was declared as 1, rather than the default of 0. We used a Variant array where the top row and left column are set to string variables and the lower right 2x2 submatrix is set to numeric values. This allows both the chart's labels and data to be set simultaneously. Note that declaring the array as type String works too, as long as the lower right submatrix contains text representations of numeric values. If you wish only to set the charts data, the array may be of the numeric types Integer, Long, Single or Double. Note that doing this will replace the existing chart labels with default row/column labels. Note, a one-dimensional array will work as well as a two-dimensional one as long as the last values are either numeric or text representations of numeric values.

The following example queries data from the chart. In this example, it is not necessary to declare the variable first. The example contains a loop to print out the array returned from the chart. Note the use of the Lbound and Ubound functions to determine the array bounds from the chart.

' Set the variant from the chart data.

Y = MSChart1.ChartData

' Print out the variant.

For i = LBound(Y,1) To Ubound(Y,1)

For j = Lbound(Y,2) To UBound(Y,2)

MsgBox Y(i,j)

Next

Next

The returned array lower bound values are equal to 0. The returned array will always be a two-dimensional array of type Variant. Since ChartData is the default property for the chart, the object name alone, such as MSChart1, may be sustituted for MSChart1.ChartData. So you could use MSChart1 = data or data = MSChart1.


ChartType Property

Returns or sets the chart type being used to display a chart.

Syntax

object.ChartType [ = type]

The ChartType property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
type	Integer. A VtChChartType constant that describes the chart type.


Column Property

Returns or sets the current data column in the data grid.

Syntax

object.Column [ = col ]

The Column property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
col	Integer. The current data column.
Remarks

You must select a column before you can use other properties to change the column's corresponding chart series or any data point within the series.


ColumnCount Property

Returns or sets the number of columns in the current data grid associated with a chart.

Syntax

object.ColumnCount [ = count]

The ColumnCount property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
count	The number of data columns.


ColumnLabel Property (MSChart)

Returns or sets the label text associated with a column in the data grid of a chart.

Syntax

object.ColumnLabel [ = text ]

The ColumnLabel property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
text	String. Label text associated with a column in the data grid.
Remarks

This property sets the label for the column currently identified by the Column property.


ColumnLabelCount Property

Returns or sets the number of levels of labels on the columns in the data grid associated with a chart.

Syntax

object.ColumnLabelCount [ = count]

The ColumnLabelCount property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
count	Integer. The number of column label levels. Set this property to add or delete levels of labels on data grid columns.
Remarks

Column label levels are numbered from bottom to top, beginning at 1. Levels are added or subtracted from the top.


ColumnLabelIndex Property

Returns or sets a specific level of column labels associated with a chart.

Syntax

object.ColumnLabelIndex [ = index]

The ColumnLabelIndex property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
index	Integer. Identifies a column label level.
Remarks

To set a label on a column with more than one level of labels, or to return the current value for a label, you must first identify which level you want to affect. Column label levels are numbered from bottom to top, beginning at 1.


Coor Object

Describes a floating x and y coordinate pair for a chart.

Syntax

Coor


X Property

Returns or sets the x value in a floating coordinate pair for a chart.

Syntax

object.X [ = x ]

The X property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
x	Single. (Long for LCoor object.) Identifies the x value of the coordinate.


Y Property

Returns or sets the y value in a floating coordinate pair for a chart.

Syntax

object.Y [ = y ]

The Y property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
y	Single. (Long for LCoor object.) Identifies the y value of the coordinate.


Set Method (MSChart)

Sets the x and y coordinate values for a chart.

Syntax

object.Set ( x,y )

The Set method syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
x	Single. (Long for LCoor object.) Identifies the x value of the coordinate.
y	Single. (Long for LCoor object.) Identifies the y value of the coordinate.


Data Property (MSChart)

Returns or sets a value that is inserted into the current data point in the data grid of a chart.

Syntax

object.Data [ = value]

The Data property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
value	Integer. The data point value.
Remarks

If the current data point already contains a value, it is replaced by the new value. The chart is redrawn to reflect the new value for the current data point.


DataGrid Property

Returns a reference to a DataGrid object that describes the data grid associated with a chart.

Syntax

object.DataGrid

The object placeholder represents an object expression that evaluates to an object in the Applies To list.


DataGrid Object

A chart data grid.

Syntax

DataGrid


ColumnLabel Property (DataGrid)

Returns or sets the label on a data column in the grid associated with a chart.

Syntax

object.ColumnLabel( column, labelIndex ) [= text ]

The ColumnLabel property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
column	Integer. Identifies a specific data column. Columns are numbered from left to right beginning with 1. Any columns containing labels are not counted as data columns.
labelIndex	Integer. Identifies a specific label. If more than one level of column labels exist for the column, you must identify one of them. Column labels are numbered from bottom to top beginning at 1.
text	String. The column label text.


CompositeColumnLabel Property

Returns the multilevel label string that identifies a column in the data grid associated with a chart.

Syntax

object.CompositeColumnLabel(column)

The CompositeColumnLabel property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
column	Integer. Identifies a specific data column. Columns are numbered from left to right beginning with 1. Any columns containing labels are not counted as data columns.


CompositeRowLabel Property

Returns the multilevel label string that identifies a row in the data grid associated with a chart.

Syntax

object.CompositeRowLabel (row)

The CompositeRowLabel property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
row	Integer. Identifies a specific data row. Rows are numbered from top to bottom beginning with 1. Any rows containing labels are not counted as data rows.


RowLabel Property (DataGrid)

Returns or sets a specific row label in the current data grid associated with a chart.

Syntax

object.RowLabel ( row, labelIndex ) [ = text ]

The RowLabel property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
row	Integer. Specifies a row. Rows are numbered from top to bottom beginning at 1.
labelIndex	Integer. Specifies a specific level of row labels. Row labels are numbered from left to right beginning at 1.
Text	String. Text of the row label.


DeleteColumns Method

Deletes columns of data and their associated labels from the data grid associated with a chart.

Syntax

object.DeleteColumns (column, count)

The DeleteColumns method syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
column	Integer. Identifies a specific data column. Columns are numbered from left to right beginning with 1.
count	Integer. Specifies the number of columns you want to delete.


DeleteColumnLabels Method

Deletes levels of labels from the data columns in a data grid associated with a chart.

Syntax

object.DeleteColumnLabels (labelIndex, count)

The DeleteColumnLabels method syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
labelIndex	Integer. Identifies the number of the first level of labels you want to delete. Column label levels are numbered bottom to top, beginning with 1.
count	Integer. Specifies the number of label levels you want to delete. The number of columns being deleted is calculated from the column identified in labelIndex up.


DeleteRows Method

Deletes rows of data and their associated labels from the data grid associated with a chart.

Syntax

object.DeleteRows (row, count)

The DeleteRows method syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
row	Integer. Identifies a specific data row. Rows are numbered from top to bottom beginning with 1.
count	Integer. Specifies the number of rows you want to delete.


DeleteRowLabels Method

Deletes levels of labels from the data rows in a data grid associated with a chart.

Syntax

object.DeleteRowLabels (labelIndex, count)

The DeleteRowLabels method syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
labelIndex	Integer. Identifies the number of the first level of labels you want to delete. Row labels are numbered right to left, beginning with 1.
count	Integer. Specifies the number of label levels you want to delete. Row labels are deleted from the row identified by labelIndex to the left.


GetData Method (MSChart)

Returns the value currently stored in a specific data point in the data grid associated with a chart.

Syntax

object.GetData (row, column, dataPoint, nullFlag)

The GetData method syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
row	Integer. Identifies the row containing the data point value.
column	Integer. Identifies the column containing the data point value.
dataPoint	Double. The data point value.
nullFlag	Integer. Indicates whether or not the data point value is a null.


InitializeLabels Method

Assigns each label in the first level of data grid labels a unique identifier.

Syntax

object.InitializeLabels

The object placeholder represents an object expression that evaluates to an object in the Applies To list.


InsertColumns Method

Adds one or more data columns to the data grid associated with a chart.

Syntax

object.InsertColumns (column, count)

The InsertColumns method syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
column	Integer. Identifies a specific data column. Columns are numbered from left to right beginning with 1.
count	Integer. Specifies the number of columns you want to insert.


InsertColumnLabels Method

Inserts levels of labels for the data columns in a data grid associated with a chart.

Syntax

object.InsertColumnLabels (labelIndex, count)

The InsertColumnLabels method syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
labelIndex	Integer. Identifies the number of the first level of labels you want to insert. Column label levels are numbered bottom to top, beginning with 1.
count	Integer. Specifies the number of label levels you want to insert. The number of columns being inserted is calculated from the column identified in labelIndex up.


InsertRows Method

Adds one or more data rows to the data grid associated with a chart.

Syntax

object.InsertRows (row, count)

The InsertRows method syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
row	Integer. Identifies a specific data row. Rows are numbered from top to bottom beginning with 1.
count	Integer. Specifies the number of rows you want to insert. Rows contain null data until you fill them with data.


InsertRowLabels Method

Inserts levels of labels from the data rows in a data grid associated with a chart.

Syntax

object.InsertRowLabels (labelIndex, count)

The InsertRowLabels method syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
labelIndex	Integer. Identifies the number of the first level of labels you want to insert. Row labels are numbered right to left, beginning with 1.
count	Integer. Specifies the number of label levels you want to insert. Row labels are inserted from the row identified by labelIndex to the left.


MoveData Method

Moves a range of data within a data grid associated with a chart.

Syntax

object.MoveData (top, left, bottom, right, overOffset, downOffset)

The MoveData method syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
top	Integer. Identifies the first row in the range to move.
left	Integer. Identifies the first column in the range to move.
bottom	Integer. Identifies the last row in the range to move.
right	Integer. Identifies the last column in the range to move.
overOffset	Integer. Identifies the horizontal direction data should be moved. A positive value moves data to the right; a negative value moves data to the left.
downOffset	Integer. Identifies the vertical direction data should be moved. A positive value moves data down, a negative value moves data up.


RandomDataFill Method

Fills the data grid associated with a specific chart with randomly generated data.

Syntax

object.RandomDataFill

The object placeholder represents an object expression that evaluates to an object in the Applies To list.


RandomFillColumns Method

Fills a number of data grid columns associated with a chart with random values.

Syntax

object.RandomFillColumns (column, count)

The RandomFillColumns method syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
column	Integer. Identifies the first column you wish to fill. Columns are numbered from left to right beginning with 1.
count	Integer. Specifies the number of columns you want to fill with random data.


RandomFillRows Method

Fills a number of data grid rows associated with a chart with random values.

Syntax

object.RandomFillRows (row, count)

The RandomFillRows method syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
row	Integer. Identifies the first row you wish to fill. Rows are numbered from top to bottom beginning with 1.
count	Integer. Specifies the number of rows you want to fill with random data.


SetData Method (MSChart)

Sets the value for a specific data point in the data grid associated with a chart.

Syntax

object.SetData (row, column, dataPoint, nullFlag)

The SetData method syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
row	Integer. Identifies the row containing the data point value.
column	Integer. Identifies the column containing the data point value.
dataPoint	Double. The data point value.
nullFlag	Integer. Indicates whether or not the data point value is a null.


SetSize Method

Resizes the number of data columns and rows, as well as the number of levels of column labels and row labels of a data grid associated with a chart at one time.

Syntax

object.SetSize (rowLabelCount, columnLabelCount, dataRowCount, columnLabelCount)

The SetSize method syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
rowLabelCount	Integer. Returns or sets the number of levels of row labels you want on the data grid.
columnLabelCount	Integer. Returns or sets the number of levels of column labels you want on the data grid.
dataRowCount	Integer. Returns or sets the number of data rows you want on the data grid.
dataColumnCount	Integer. Returns or sets the number of data columns you want on the data grid.
Remarks

This method can be used in place of RowCount, ColumnCount, RowLabelCount and ColumnLabelCount.

If you reduce the size of the data grid, data in deleted rows or columns is destroyed.


DataGrid Object Example

The following example sets the chart parameters for a three-dimensional bar chart, fills the chart with random data and labels the data grid columns.

Private Sub Command1_Click()

Dim rowLabelCount As Integer

Dim columnLabelCount As Integer

Dim rowCount As Integer

Dim columnCount As Integer

Set DataGrid = MSChart1.DataGrid

MSChart1.ChartType = VtChChartType3dBar

With MSChart1.DataGrid

' Set Chart parameters using methods.

rowLabelCount = 2

columnLabelCount = 2

rowCount = 6

columnCount = 6

.SetSize RowLabelCount, RolumnLabelCount, _

RowCount, ColumnCount

' Randomly fill in the data.

.RandomDataFill

' Then assign labels to second Level.

labelIndex = 2

column = 1

.ColumnLabel(column, labelIndex) = "Product 1"

column = 4

.ColumnLabel(column, labelIndex) = "Product 2"

row = 1

.RowLabel(row, labelIndex) = "1994"

row = 4

.RowLabel(row, labelIndex) = "1995"

End With

End Sub


Item Property (MSChart)

Returns a reference to an object within a collection that describes a chart element.

Syntax

object.Item (index)


DataPoint Object

One item within a DataPoints collection that describes the attributes of an individual data point on a chart.

Syntax

DataPoint


Offset Property

Returns or sets the distance that a chart element is offset or pulled away from its default location.

Syntax

object.Offset [ = offset ]

The Offset property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
offset	For the DataPoint object, this is an integer describing the offset distance. Offset is measured in inches or centimeters depending upon your default Windows settings. For the DataPointLabel and Shadow objects, this is a reference to a Coor object that describe the x and y values of the offset.
Remarks

For the DataPointLabel object, this property indicates the distance that a data point label is offset or pulled away from one of the predefined (standard) label positions. The offset is added to the position calculated for the point based on the DataPointLabel object's LocationType setting.


ResetCustom Method

Resets any custom attributes placed on a data point to the series default.

Syntax

object.ResetCustom

The object placeholder represents an object expression that evaluates to an object in the Applies To list.


DataPoint Object Example

The following example assigns a variable to a data point and sets the data point color and marker.

Private Sub Command1_Click()

' Change the color and marker of First DataPoint in

' the First Series.

With MSChart1.Plot.SeriesCollection._

Item(1).DataPoint

' Change Data Point color to blue.

.Brush.Style = VtBrushStyleSolid

' Set Color=Blue.

.Brush.FillColor.Set 0, 255, 255

' Set DataPoint marker visible.

.Marker.Visible = True

End With

End Sub


DataPoints Property

Returns a reference to a DataPoint Collection that describes the data points within a chart series.

Syntax

object.DataPoints

The object placeholder represents an object expression that evaluates to an object in the Applies To list.


DataPoints Collection

A group of chart data points.

Syntax

DataPoints.Item(index)

The DataPoints collection syntax has these parts:

Part	Description
index	Identifies a specific data point within the current series. For this version of the chart, –1 is the only valid value for this argument. This allows you two make changes to the default settings for all data points in the series. Settings cannot be changed for individual data points within the series.


DataPoints Collection Example

The following example sets the markers for each data point in a chart.

Private Sub Command1_Click()

Dim DataPoint As Object

Dim Index As Integer

For Each DataPoint In _

MSChart1.plot.SeriesCollection.Item(1).DataPoints

' Set DataPoint marker visible.

DataPoint.Marker.visible = True

DataPoint.Marker.width = 12

Next

End Sub

The Datapoints collection Item method takes a special –1 argument to designate default properties for all data points of the series. The Datapoint object returned by Item(–1) can be manipulated just like a normal Datapoint object. A property set on this default data point affects every data point in the series, except those data points that have had that property set individually. In the example below, data point 2 of series 1 has its data point label location set to the base of the bar (assuming a bar chart). The rest of the data point labels for series 1 are set to appear above the data point. It makes no difference whether individual data point settings come before or after default settings; the individual settings always override the default settings. The ResetCustom method can be used to remove any individual settings for a data point and cause it to use the default settings for the series.

With MSChart1.Plot.SeriesCollection.Item(1)

.DataPoints.Item(2).DataPointLabel._

LocationType = VtChLabelLocationTypeBase

.Item(-1).DataPointLabel.LocationType = _

VtChLabelLocationTypeAbovePoint

End With


DataPointLabel Property

Returns a reference to a DataPointLabel object that describes a label on an individual chart data point.

Syntax

object.DataPointLabel

The object placeholder represents an object expression that evaluates to an object in the Applies To list.


DataPointLabel Object

The label for a data point on a chart.

Syntax

DataPointLabel


Component Property

Returns or sets the type of label to be used to identify the data point.

Syntax

object.Component [ = type]

The Component property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
type	Integer. A VtChLabelComponent constant that identifies the label type.


Custom Property

Returns or sets a value that determines if custom text is used to label a data point on a chart.

Syntax

object.Custom [ = boolean]

The Custom property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
boolean	A Boolean expression that specifies whether custom text is used, as described in Settings.
Settings

The settings for boolean are:

Setting	Description
True	The label contains custom text.
False	Information specified by the DataPointLabel object's Components property is used to label the data point.


LineStyle Property

Returns or sets the type of line used to connect a data point to a label on a chart.

Syntax

object.LineStyle [ = type]

The LineStyle property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
type	Integer. A VtChLabelLineStyle constant identifying the connecting line.


LocationType Property

Returns or sets the standard position used to display a chart element.

Syntax

object.LocationType [=type]

The LocationType property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
type	Integer. For the DataPointLabel object, A VtChLabelLocationType constant identifying label position. For a Location object, A VtChLocationType constant describing the location of text.


PercentFormat Property

Returns or sets a string that describes the format used to display the label as a percent.

Syntax

object.PercentFormat [ = format]

The PercentFormat property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
format	String. Describes the format used to display a label as a percent.
Remarks

Use the DataPointLabel object's Component property to change the label type.

The following table lists several examples of percentage format strings. The values listed at left are the valid formats.

	3	-3	.3
0%	300%	-300%	30%
0.0%	300.0%	-300.0%	30.0%
0.00%	300.00%	-300.00%	30.00%


ValueFormat Property

Returns or sets the format used to display the label as a value.

Syntax

object.ValueFormat [ = format]

The ValueFormat property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
format	String. Describes the format used to display a label as a value.
Remarks

Use the DataPointLabel object's Component property to change the label type.


ResetCustomLabel Method

Resets any custom attributes placed on a data point label in a chart to the series default.

Syntax

object.ResetCustomLabel

The object placeholder represents an object expression that evaluates to an object in the Applies To list.


Select Method

Selects the specified chart element.

object.Select

The object placeholder represents an object expression that evaluates to an object in the Applies To list.


DataUpdated Event

Occurs when the chart data grid has changed.

Syntax

Private Sub object_DataUpdated (row As Integer, column As Integer, labelRow As Integer, labelColumn As Integer, labelSetIndex As Integer, updateFlags As Integer)

The DataUpdated event syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
row	Integer. Indicates the row in the data grid.
column	Integer. Indicates the column in the datagrid.
labelRow	Integer. Indicates the row label.
labelColumn	Integer. Indicates the column label.
labelSetIndex	Integer. Identifies the level of labels. Levels of labels are numbered from the axis out, beginning with 1.
updateFlag	Integer. Provides information about the update of the data, as described in Settings.
Settings

The following table lists the constants for updateFlag.

Constant	Description
VtChNoDisplay	Absence of update flags; the chart display is not affected. (Defined as 0.)
VtChDisplayPlot	Update will cause the plot to repaint.
VtChLayoutPlot	Update will cause the plot to lay out.
VtChDisplayLegend	Update will cause the legend to repaint.
VtChLayoutLegend	Update will cause the legend to lay out.
VtChLayoutSeries	Update will cause the series to lay out.
VtChPositionSection	A chart section has been moved or resized.
Remarks

If row and column are nonzero, the change occurs to the indicated data cell. If labelRow or labelColumn, along with labelSetIndex, are nonzero, the indicated row or column label changes. If none of these are nonzero, no specific information about the change is available.


DoSetCursor Property

Returns or sets a value that indicates whether or not the cursor can be set by a chart. The DoSetCursor property determines whether or not the application can control what the mouse pointer looks like.

Syntax

object.DoSetCursor [ = boolean]

The DoSetCursor property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
boolean	A Boolean expression that specifies whether custom text is used, as described in Settings.
Settings

The settings for boolean are:

Setting	Description
True	The application can control the mouse pointer appearance.
False	The application cannot control the mouse pointer appearance.


DonePainting Event

Occurs immediately after the chart repaints or redraws.

Syntax

Private Sub object_DonePainting ( )

The object placeholder represents an object expression that evaluates to an object in the Applies To list.


DrawMode Constants

The VtChDrawMode constants provide options for redisplaying a chart after it has been altered.

Constants	Description
VtChDrawModeDraw	Draw mode. The chart is redrawn on the screen every time you change a setting.
VtChDrawModeBlit	Blit mode. The chart is redrawn off the screen and displayed after the redraw is complete.
Blit mode stores a bitmap copy of the chart in memory when the chart is laid out. Repainting the chart uses the bitmap and draws very quickly. It requires more memory than Draw mode, but can save time waiting for the chart to redraw on screen. Blit mode is particularly useful when working with charts that contain many elements.


DrawMode Property (MSChart)

Returns or sets a value that determines when and how a chart is repainted.

Syntax

object.DrawMode [ = mode]

The DrawMode property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
mode	Integer. A value that determines how and when the chart will be redrawn, as shown in Settings.
Settings

The settings for mode are:

Constant	Value	Description
VtChDrawModeDraw	0	Draws directly to the display device.
VtChDrawModeBlit	1	Blits an offscreen drawing to the display device.


EditCopy Method

Copies a picture of the current chart to the clipboard in Windows metafile format. It also copies the data being used to create the chart to the clipboard.

Syntax

object.EditCopy

The object placeholder represents an object expression that evaluates to an object in the Applies To list.

Remarks

This method allows you to paste the chart's data or a picture of the chart itself into another application. Since both the data and the picture of the chart are stored on the clipboard, what gets pasted into the new application varies depending on the type of application. For example, if you execute the chart's EditCopy method in your code and then go to an Excel spreadsheet and select Edit Paste, the chart data set is placed in the spreadsheet. To insert the picture of the chart into the spreadsheet, select Edit Paste Special and select the Picture type.


EditPaste Method

Pastes a Windows metafile graphic or tab-delimited text from the clipboard into the current selection on a chart.

Syntax

object.EditPaste

The object placeholder represents an object expression that evaluates to an object in the Applies To list.

Remarks

The chart can accept several types of information from the clipboard, depending on the currently selected chart element when EditPaste is called. If the entire chart is selected, the chart looks for data on the clipboard and attempts to use this new data to redraw the chart. If an item that can accept a picture, such as a bar or chart backdrop is selected, the chart looks for a metafile on the clipboard. If it finds a metafile, it uses that metafile to fill the selected object.


Fill Property

Returns a reference to a Fill object that describes the type and appearance of a chart object's backdrop.

Syntax

object.Fill

The object placeholder represents an object expression that evaluates to an object in the Applies To list.


Fill Object

Describes the type and appearance of an object's backdrop in a chart.

Syntax

Fill


Fill Object Example

The following example sets a gradient backdrop for a chart using the Fill object.

Private Sub Command1_Click()

With MSChart1.backdrop.Fill

' Set a brush pattern backdrop.

.Style = VtFillStyleBrush

.Brush.Style. = VtBrushPattern50Percent

End With

End Sub


FillStyle Constants

The VtFillStyle constants provide options for indicating the type of fill used to paint a backdrop.

Constant	Description
VtFillStyleNull	No fill (background shows through)
VtFillStyleBrush	A solid color or pattern fill


Font Property (MSChart)

Returns a reference to a standard Font object that describes the font used to display text on the chart.

Syntax

object.Font

The object placeholder represents an object expression that evaluates to an object in the Applies To list.


FontEffect Constants

VtFontEffect provides methods of altering fonts for the desired effect.

Constant	Description
VtFontEffectStrikeThrough	Applies the strike-through attribute to the font.
VtFontEffectUnderline	Applies the underscore attribute to the font.


FontStyle Constants

VtFontStyle provides valid font attribute options.

Constant	Description
VtFontStyleBold	Applies the bold attribute to the font.
VtFontStyleItalic	Applies the italic attribute to the font.
VtFontStyleOutline	Applies the outline attribute to the font.


Footnote Property

Returns a reference to a Footnote object that provides information about the descriptive text used to annotate a chart.

Syntax

object.Footnote

The object placeholder represents an object expression that evaluates to an object in the Applies To list.


Footnote Object

Descriptive text that appears beneath a chart.

Syntax

Footnote


Footnote Object Example

The following example sets the footnote location, text and color for a chart.

Private Sub Command1_Click()

With MSChart1.Footnote

' Make Footnote Visible.

.Location.Visible = True

.Location.LocationType = _

VtChLocationTypeBottomLeft

' Set Footnote properties.

.text = "Chart Footnote"

.VtFont.VtColor.Set 255, 0, 0

End With

End Sub


FootnoteActivated Event

Occurs when the user double clicks the chart footnote.

Syntax

Private Sub object_FootnoteActivated ( mouseFlag As Integer, cancel As Integer )

The FootnoteActivated event syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
mouseFlag	Integer. Indicates whether a key is held down when the mouse button is clicked, as described in Settings.
cancel	This argument is not used at this time.
Settings

The event handler determines if a key is held down when the mouse button is clicked and sets mouseFlag to:

Constants	Description
VtChMouseFlagShiftKeyDown	If the SHIFT key is held down.
VtChMouseFlagControlKeyDown	If the CONTROL key is held down.


FootnoteSelected Event

Occurs when the user clicks the chart footnote.

Syntax

Private Sub object_FootnoteSelected ( mouseFlag As Integer, cancel As Integer )

The FootnoteSelected event syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
mouseFlag	Integer. Indicates whether a key is held down when the mouse button is clicked, as described in Settings.
cancel	This argument is not used at this time.
Settings

The event handler determines if a key is held down when the mouse button is clicked and sets mouseFlag to:

Constants	Description
VtChMouseFlagShiftKeyDown	If the SHIFT key is held down.
VtChMouseFlagControlKeyDown	If the CONTROL key is held down.


FootnoteText Property

Returns or sets the text used as the footnote.

Syntax

object.FootnoteText [ = text]

The FootnoteText property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
text	String. The footnote text.
Remarks

The same results can be achieved by using the Text property of the Footnote object.


FootnoteUpdated Event

Occurs when the chart footnote changes.

Syntax

Private Sub object_FootnoteUpdated (updateFlags As Integer)

The FootnoteUpdated event syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
updateFlag	Integer. Provides information about the update of the footnote, as described in Settings.
Settings

The following table lists the constants for updateFlag.

Constant	Description
VtChNoDisplay	Absence of update flags; the chart display is not affected. (Defined as 0.)
VtChDisplayPlot	Update will cause the plot to repaint.
VtChLayoutPlot	Update will cause the plot to lay out.
VtChDisplayLegend	Update will cause the legend to repaint.
VtChLayoutLegend	Update will cause the legend to lay out.
VtChLayoutSeries	Update will cause the series to lay out.
VtChPositionSection	A chart section has been moved or resized.


Frame Property

Returns a reference to a Frame object that describes the appearance of the frame around a chart element.

Syntax

object.Frame

The object placeholder represents an object expression that evaluates to an object in the Applies To list.


Frame Object

Holds information about the appearance of the frame around a chart element.

Syntax

Frame


Width Property (MSChart)

Returns or sets the width of a chart element, in points.

Syntax

object.Width [ = width]

The Width property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
width	Single. The width of the chart element.


Frame Object Example

The following example sets a blue, double-line frame on a chart backdrop.

Private Sub Command1_Click()

With MSChart1.backdrop.Frame

.Style = VtFrameStyleDoubleLine

.Width = 2

.FrameColor.Set 0, 0, 255	' Blue frame.

.SpaceColor.Set 255, 0, 0	' Red spacing.

End With

End Sub


FrameStyle Constants

The VtFrameStyle constants provide options for displaying backdrop frames.

Constant	Description
VtFrameStyleNull	No frame.
VtFrameStyleSingleLine	A single line encloses the backdrop.
VtFrameStyleDoubleLine	Two equal width lines enclose the backdrop.
VtFrameStyleThickInner	A thick inner line and a thin outer line enclose the backdrop.
VtFrameStyleThickOuter	A thin inner line and a thick outer line enclose the backdrop.


GetSelectedPart Method

Identifies the currently selected chart element.

Syntax

object.GetSelectedPart (part, index1, index2, index3, index4)

The GetSelectedPart method syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
part	Integer. Specifies the chart element. Valid constants are VtChPartType.
index1	Integer. If element refers to a series or a data point, this argument specifies which series. Series are numbered in the order their corresponding columns appear in the data grid from left to right, beginning with 1. If element refers to an axis or axis label, this argument identifies the axis type with a VtChAxisId constant.
Index2	Integer. If element refers to a data point, this argument specifies which data point in the series identified by index1.
index3	Integer. If element refers to an axis label, this argument refers to the level of the label. Axis label levels are numbered from the axis out, beginning with 1. If element is not an axis label, the argument is unused.
index4	Integer. This argument is unused at this time.


HorizontalAlignment Constants

The VtHorizontalAlignment constants provide options for text alignment.

Constant	Description
VtHorizontalAlignmentLeft	All lines of text are aligned on the left margin.
VtHorizontalAlignmentRight	All lines of text are aligned on the right margin.
VtHorizontalAlignmentCenter	All lines of text are centered horizontally.


Intersection Property

Returns a reference to an Intersection object that describes the point at which an axis intersects another axis on a chart.

Syntax

object.Intersection

The object placeholder represents an object expression that evaluates to an object in the Applies To list.


Intersection Object

The point at which an axis intersects an intersecting axis on a chart.

Syntax

Intersection


Auto Property (Intersection)

Returns or sets a value that determines whether or not the Intersection object uses the value of the Point property to position the axis.

Syntax

object.Auto [ = boolean]

The Auto property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
boolean	A Boolean expression that specifies whether the item is displayed, as described in Settings.
Settings

The settings for boolean are:

Setting	Description
True	The axis is positioned in its standard location.
False	The intersecting axis is positioned at the value indicated by Point.


AxisId Property

Returns a specific axis that intersects with the current axis.

Syntax

object.AxisId

The object placeholder represents an object expression that evaluates to an object in the Applies To list.

Return Value

The return value is an integer that identifies the intersecting axis.


Index Property (Intersection)

Returns which axis intersects another axis when there is more than one axis with the same index.

Syntax

object.Index

The object placeholder represents an object expression that evaluates to an object in the Applies To list.

Return Value

The return value is an integer that specifies the index of the intersecting axis. Currently, 1 is the only valid value for this argument.


LabelsInsidePlot Property

Returns or sets a value that determines whether to leave the axis labels at the normal location or move them with the axis to the new intersection point.

Syntax

object.LabelsInsidePlot [= boolean]

The LabelsInsidePlot property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
boolean	A Boolean expression that specifies where to display the axis labels, as described in Settings.
Settings

The settings for boolean are:

Setting	Description
True	The axis labels remain at the normal location.
False	The labels move inside the plot to the new intersection point.
Remarks

If this property is set, then the Intersection object's Auto property is automatically set to False.


Point Property

Returns or sets the point where the current axis intersects with another axis.

Syntax

object.Point [ = point]

The Point property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
point	Double. The point on an axis where the current axis intersects.
Remarks

If this property is set, then the Intersection object's Auto property is automatically set to False.


Intersection Object Example

The following example sets manual intersection position properties and displays labels with the axis.

Private Sub Command1_Click()

' Change chart type to 3D Line.

MSChart1.ChartType = VtChChartType3dLine

With MSChart1.Plot.Axis(VtChAxisIdX).Intersection

' Set Intersection Properties.

.Auto = False	' Set positioning to manual.

.Point = 20	' Set intersection with the Y

' Axis to 20.

.LabelsInsidePlot = True	' Display Labels

' with Axis not at

' the base.

End With

End Sub


Labels Property

Returns a reference to a Labels collection that describes the labels on a chart axis.

Syntax

object.Labels

The object placeholder represents an object expression that evaluates to an object in the Applies To list.


Labels Collection

A group of chart axis labels.

Syntax

axis.Labels(index)

The Labels collection syntax has these parts:

Part	Description
axis	An Axis object.
index	Identifies a specific axis label (Label object)within the current collection.


Label Object
Label Object (Item)

An item within a Labels collection that describes a specific chart axis label.

Syntax

axis.Label


Auto Property (Label)

Returns or sets a value that determines whether axis labels are automatically rotated to improve the chart layout.

Syntax

object.Auto [ = boolean ]

The Auto property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
boolean	A Boolean expression that specifies where to display the axis labels, as described in Settings.
Settings

The settings for boolean are:

Setting	Description
True	The labels may be rotated.
False	The labels are not rotated. Long labels may not display properly.


Format Property (MSChart)

Returns or sets the characters that define the format used to display the axis label.

Syntax

object.Format [ = format]

The Format property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
format	String. Defines the format used to display the axis label.


FormatLength Property

Returns the length of the format string.

Syntax

object.FormatLength

The object placeholder represents an object expression that evaluates to an object in the Applies To list.

Return Value

The return value is a string that specifies the axis label text string length.


Standing Property

Returns or sets a value that specifies whether axis labels are displayed horizontally in the x or z plane or vertically on the text baseline in the y plane.

Syntax

object.Standing [ = boolean ]

The Standing property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
boolean	A Boolean expression that specifies how to display the axis labels, as described in Settings.
Settings

The settings for boolean are:

Setting	Description
True	The axis labels are displayed vertically on the text baseline in the y plane.
False	The axis labels are displayed horizontally in the x or z plane.


LabelComponent Constants

The VtChLabelComponent constants provide options for displaying chart labels.

Constant	Description
VtChLabelComponentValue	The value of the data point appears in the label. Data points in XY, Polar, and Bubble charts actually have two or three values. The default label for these chart types display all values in a standard format. You can customize this format to highlight an individual data value.
VtChLabelComponentPercent	The value of the data point is displayed in the label as a percentage of the total value of the series.
VtChLabelComponentSeriesName	The series name is used to label the data point. This name is taken from the label associated with the column in the data grid.
VtChLabelComponentPointName	The data point name is used to label the data point.


LabelLineStyle Constants

The VtChLabelLineStyle constants provide options for displaying lines connecting a label and series.

The following table lists the valid constants for VtChLabelLineStyle:

Constants	Description
VtChLabelLineStyleNone	No line connects the label and series.
VtChLabelLineStyleStraight	A straight line connects the label and series.
VtChLabelLineStyleBent	A bent line connects the label and series.


LabelLocationType Constants

The VtChLabelLocationType constants provide options for determining series label location.

The following table lists the valid constants for VtChLabelLocationType:

Constants	Description
VtChLabelLocationTypeNone	No label displayed.
VtChLabelLocationTypeAbovePoint	The label is displayed above the data point.
VtChLabelLocationTypeBelowPoint	The label is displayed below the data point.
VtChLabelLocationTypeCenter	The label is displayed centered on the data point.
VtChLabelLocationTypeBase	The label is displayed at the base along the category axis, directly beneath the data point.
VtChLabelLocationTypeInside	The label is displayed inside a pie slice.
VtChLabelLocationTypeOutside	The label is displayed outside a pie slice.
VtChLabelLocationTypeLeft	The label is displayed to the left of the data point.
VtChLabelLocationTypeRight	The label is displayed to the right of the data point.


Layout Method

Lays out a chart, forcing recalculation of automatic values.

Syntax

object.Layout

The object placeholder represents an object expression that evaluates to an object in the Applies To list.

Remarks

A chart is laid out the first time it is drawn. When any chart settings change, the chart is again laid out at the next draw. There are a number of settings the chart calculates, such as the axis minimum and maximum values, based on the chart type or some other setting. These values are not determined until the chart is laid out. If you attempt to "get" these automatic values before the chart is properly laid out, they will not reflect the new values.


LCoor Object

Describes a long integer x and y coordinate pair.

Syntax

Lcoor


Legend Property

Returns a reference to a Legend object that contains information about the appearance and behavior of the graphical key and accompanying text that describes the chart series.

Syntax

object.Legend

The object placeholder represents an object expression that evaluates to an object in the Applies To list.


Legend Object

Represents the graphical key and accompanying text that describes a chart series.

Syntax

Legend


Legend Object Example

The following example sets the text and backdrop parameters for a chart legend.

Private Sub Command1_Click()

With MSChart1.Legend

' Make Legend Visible.

.Location.Visible = True

.Location.LocationType = VtChLocationTypeRight

' Set Legend properties.

.TextLayout.HorzAlignment = _

VtHorizontalAlignmentRight	' Right justify.

' Use Yellow text.

.VtFont.VtColor.Set 255, 255, 0

.Backdrop.Fill.Style = VtFillStyleBrush

.Backdrop.Fill.Brush.Style = VtBrushStyleSolid

.Backdrop.Fill.Brush.FillColor.Set 255, 0, 255

End With

End Sub


LegendActivated Event

Occurs when the user double clicks on the chart legend.

Syntax

Private Sub object_LegendActivated ( mouseFlag As Integer, cancel As Integer )

The LegendActivated event syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
mouseFlag	Integer. Indicates whether a key is held down when the mouse button is clicked, as described in Settings.
cancel	Integer. This argument is not used at this time.
Settings

The event handler determines if a key is held down when the mouse button is clicked and sets mouseFlag to:

Constants	Description
VtChMouseFlagShiftKeyDown	If the SHIFT key is held down.
VtChMouseFlagControlKeyDown	If the CONTROL key is held down.


LegendSelected Event

Occurs when the user clicks on the chart legend.

Syntax

Private Sub object_LegendSelected ( mouseFlag As Integer, cancel As Integer )

The LegendSelected event syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
mouseFlag	Integer. Indicates whether a key is held down when the mouse button is clicked.
cancel	Integer. This argument is not used at this time.
Settings

The event handler determines if a key is held down when the mouse button is clicked and sets mouseFlag to:

Constants	Description
VtChMouseFlagShiftKeyDown	If the SHIFT key is held down.
VtChMouseFlagControlKeyDown	If the CONTROL key is held down.


LegendUpdated Event

Occurs when the chart legend has changed.

Syntax

Private Sub object_LegendUpdated (updateFlags As Integer)

The LegendUpdated event syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
updateFlag	Integer. Provides information about the update of the legend, as described in Settings.
Settings

The following table lists the constants for updateFlag.

Constant	Description
VtChNoDisplay	Absence of update flags; the chart display is not affected. (Defined as 0.)
VtChDisplayPlot	Update will cause the plot to repaint.
VtChLayoutPlot	Update will cause the plot to lay out.
VtChDisplayLegend	Update will cause the legend to repaint.
VtChLayoutLegend	Update will cause the legend to lay out.
VtChLayoutSeries	Update will cause the series to lay out.
VtChPositionSection	A chart section has been moved or resized.


Light Property

Returns a reference to a Light object that provides information about the light illuminating a three-dimensional chart.

Syntax

object.Light

The object placeholder represents an object expression that evaluates to an object in the Applies To list.


Light Object

Represents the light source illuminating a three-dimensional chart.

Syntax

Light


AmbientIntensity Property

Returns or sets the percentage of ambient light illuminating a three-dimensional chart.

Syntax

object.AmbientIntensity [ = intensity ]

The AmbientIntensity property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
intensity	Single. The chart light intensity. Valid values are 0 to 1. If set to 1, all sides of the chart elements are fully illuminated no matter what light sources are turned on. If set at 0, there is no contribution from ambient light; only the sides of the chart elements facing active light sources are illuminated.


EdgeIntensity Property

Returns or sets the intensity of light used to draw the edges of objects in a three-dimensional chart.

Syntax

object.EdgeIntensity [ = edgeint ]

The EdgeIntensity property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
edgeint	Single. The edge light intensity. Valid values are 0 to 1.0. An intensity of 0 turns edges off, drawing the edges as black lines; and an intensity of 1 fully illuminates the edges using the element's pen color.
Remarks

If this property is set, then the Light object's EdgeVisible property is automatically set to True.


EdgeVisible Property

Returns or sets a value that determines whether edges are displayed on the elements in a three-dimensional chart.

Syntax

object.EdgeVisible [ = boolean ]

The EdgeVisible property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
boolean	A Boolean expression that specifies edges are displayed, as described in Settings.
Settings

The settings for boolean are:

Setting	Description
True	Edges are visible.
False	Edges are not displayed on elements in the three-dimensional chart.


Light Object Example

The following example sets the ambient light and edge lighting intensity for a chart.

Private Sub Command1_Click()

' Changes the Lighting for 3D Chart.

MSChart1.ChartType = VtChChartType3dBar

With MSChart1.Plot.Light

.AmbientIntensity = 1	' 100 % Intensity.

.EdgeIntensity = 0.5	' 50 % Intensity.

.EdgeVisible = True

End With

End Sub


LightSources Property

Returns a reference to a LightSources collection that describe all light sources used to illuminate a three-dimensional chart.

Syntax

object.LightSources

The object placeholder represents an object expression that evaluates to an object in the Applies To list.


LightSources Collection

A group of LightSource objects in a chart.

Syntax

LightSources(index)

The LightSources collection syntax has the following parts:

Part	Description
index	Integer. A number that uniquely identifies a member of the collection.


Add Method (MSChart)

Adds a LightSource object to the LightSources collection.

Syntax

object.Add (x,y,z,intensity)

The Add method syntax has these parts:

Part	Description
collection	A object expression that evaluates to an object in the Applies To list.
x, y, z	Integers. Indicate the light source location.
intensity	Single. Indicates the light source intensity.
Remarks

Setting x, y, and z to zero generates a VtChInvalidArgument error.


Remove Method (MSChart)

Removes a LightSource from the LightSources collection.

Syntax

object.Remove (index)

The Remove method syntax has these parts:

Part	Description
collection	A object expression that evaluates to an object in the Applies To list.
index	Integer. A specific light source by position in the list of light sources.


LightSource Collection Example

The following example sets the coordinates and intensity for a light source, then adds and removes a light source from a chart.

Private Sub Command1_Click()

Dim LightSource As Object

Dim Index As Integer

' Set variable to Light Source 1.

Set LightSource = _

MSChart1.Plot.Light.LightSources.Item(1)

' Set coordinates for Light Source 1 as well as its

' intensity.

LightSource.X = 1

LightSource.Y = 0.5

LightSource.Z = 1

LightSource.Intensity = 1

' Add a new light source.

MSChart1.Plot.Light.LightSources.Add 0.5, 1, 1, 1

' Remove Light Source 1.

MSChart1.Plot.Light.LightSources.Remove (1)

End Sub


LightSource Object

Represents the light source used to illuminate elements in a three-dimensional chart.

Syntax

LightSource


Z Property

Returns or sets the z value in a coordinate location.

Syntax

object.Z [ = z ]

The Z property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
z	Single. (Long for LCoor object.) Identifies the z value of the coordinate.


Intensity Property

Returns or sets the strength of the light coming from the light source.

Syntax

object.Intensity [ = strength]

The Intensity property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
strength	Single. The light strength. If the intensity is set to 100 percent (1), chart surfaces facing the light source are fully illuminated. If the light is set at 50 percent (.5), these surfaces receive 50 percent illumination from this light. Valid range is 0 to 1.
Remarks

Intensity is the default property of the LightSource object.


Set Method (LightSource)

Sets the x, y, and z coordinates and the intensity for the LightSource object location.

Syntax

object.Set (x,y,z, intensity)

The Set method syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
x, y, z	Integers. Indicate the light source location.
intensity	Single. Indicate the light source intensity.


Location Property

Returns a reference to a Location object that describes the position of textual chart elements.

Syntax

object.Location

The object placeholder represents an object expression that evaluates to an object in the Applies To list.


Location Object

Represents the current position of a textual chart element such as the title, legend, or footnote.

Syntax

Location

The object placeholder represents an object expression that evaluates to an object in the Applies To list.


Location Object Example

The following example sets the title location for a chart using the TitleLocation object.

Private Sub Command1_Click()

' Set Title Text.

MSChart1.TitleText = "Test Title Location"

With MSChart1.Title.Location

' Make Title Visible.

.Visible = True

' Use Top Left locaiton to display the title.

.LocationType = VtChLocationTypeTopLeft

End With

End Sub


LocationType Constants

VtChLocationType provides location options for chart elements.

Constant	Example
VtChLocationTypeTop	Top
VtChLocationTypeTopLeft	Top Left
VtChLocationTypeTopRight	Top Right
VtChLocationTypeLeft	Left
VtChLocationTypeRight	Right
VtChLocationTypeBottom	Bottom
VtChLocationTypeBottomLeft	Bottom Left
VtChLocationTypeBottomRight	Bottom Right
VtChLocationTypeCustom	Custom


Marker Property

Returns a reference to a Marker object that describes the icon used to identify a data point on a chart.

Syntax

object.Marker

The object placeholder represents an object expression that evaluates to an object in the Applies To list.


Marker Object

A marker that identifies a data point on a chart.

Syntax

Marker


Size Property (MSChart)

Returns or sets the size of a chart element in points.

Syntax

object.Size [ = size]

The Size property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
size	Single. Size of the chart element in points.


Marker Object Example

The following example sets a blue X marker style for a chart series.

Private Sub Command1_Click()

' Display Markers for Series 1.

For Index = 1 To MSChart1.rowCount

With MSChart1.Plot.SeriesCollection _

.Item(1).DataPoints.Item(Index).Marker

.Visible = True

.Size = 20

.Style = VtMarkerStyleX

.FillColor.automatic = False

.FillColor.Set 0, 0, 255

End With

Next Index

End Sub


MarkerStyle Constants

The VtMarkerStyle constants provide options for displaying data point markers.

Constant	Description
VtMarkerStyleNull	Supressed
VtMarkerStyleDash	Dash marker
VtMarkerStylePlus	Plus marker
VtMarkerStyleX	X marker
VtMarkerStyleStar	Star marker
VtMarkerStyleCircle	Circle marker
VtMarkerStyleSquare	Square marker
VtMarkerStyleDiamond	Diamond marker
VtMarkerStyleUpTriangle	Triangle marker
VtMarkerStyleDownTriangle	Down triangle marker
VtMarkerStyleFilledCircle	Filled circle marker
VtMarkerStyleFilledSquare	Filled square marker
VtMarkerStyleFilledDiamond	Filled diamond marker
VtMarkerStyleFilledUpTriangle	Filled triangle marker
VtMarkerStyleFilledDownTriangle	Filled down triangle marker
VtMarkerStyle3dBall	Three-dimensional ball marker


MouseFlag Constants

VtChMouseFlag indicates which keyboard key is being held down while the mouse button is clicked.

Constant	Description
VtChMouseFlagShiftKeyDown	The Shift key is held down when the mouse button is clicked.
VtChMouseFlagControlKeyDown	The Control key is held down when the mouse button is clicked.


MousePointer Property (MSChart)

Returns or sets a value indicating the type of mouse pointer displayed when the mouse is over a particular part of an object at run time.

Syntax

object.MousePointer [ = value ]

The MousePointer property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
value	Integer. A VtMousePointerConstants type constant that specifies the type of mouse pointer displayed.


MousePointer Constants

The VtMousePointer constants provide the following types of pointers.

Constant	Description
VtMousePointerArrow	Arrow pointer
VtMousePointerArrowHourGlass	Arrow and hourglass
VtMousePointerArrowQuestion	Arrow and question mark
VtMousePointerCross	Crosshair pointer
VtMousePointerDefault	Default chart pointer
VtMousePointerHourGlass	Hourglass pointer
VtMousePointerIbeam	Ibeam pointer
VtMousePointerIcon	Small square within a square pointer
VtMousePointerNoDrop	No drop pointer
VtMousePointerSize	Sizing arrows
VtMousePointerSizeAll	Sizing in all directions arrows
VtMousePointerSizeNESW	Double arrow pointing northeast and southwest
VtMousePointerNS	Double arrow pointing north and south
VtMousePointerNWSE	Double arrow pointing northwest and southeast
VtMousePointerWE	Double arrow pointing east and west
VtMousePointerUpArrow	Arrow pointing up


MSChart Control

A chart that graphically displays data.

Syntax

MSChart

Remarks

The MSChart control supports the following features:

•	True three-dimensional representation.

•	Support for all major chart types.

•	Data grid population via random data and data arrays.

The MSChart control is associated with a data grid (DataGrid object). This data grid is a table that holds the data being charted. The data grid can also include labels used to identify series and categories on the chart. The person who designs your chart application fills the data grid with information by inserting data or by importing data from a spreadsheet or array.


MSChart Control Example

The following example displays a three-dimensional chart with eight columns and rows of data and sets the legend parameters.

Private Sub Command1_Click()

With Form1.MSChart1

' Displays a 3d chart with 8 columns and 8 rows

' data.

.ChartType = VtChChartType3dBar

.ColumnCount = 8

.RowCount = 8

For column = 1 To 8

For row = 1 To 8

.Column = column

.Row = row

.Data = row * 10

Next row

Next column

' Use the chart as the backdrop of the legend.

.ShowLegend = True

.SelectPart VtChPartTypePlot, index1, index2, _

index3, index4

.EditCopy

.SelectPart VtChPartTypeLegend, index1, _

index2, index3, index4

.EditPaste

End With

End Sub


Orientation Constants

The VtOrientation constants provide options for positioning text.

Constant	Description
VtOrientationHorizontal	The text is displayed horizontally.
VtOrientationVertical	The letters of the text are drawn one on top of each other from the top down.
VtOrientationUp	The text is rotated to read from bottom to top.
VtOrientationDown	The text is rotated to read from top to bottom.


PartType Constants

The VtChPartType constants provide options for chart elements.

Constant	Description
VtChPartTypeChart	Identifies the chart control.
VtChPartTypeTitle	Identifies the chart title.
VtChPartTypeFootnote	Identifies the chart footnote.
VtChPartTypeLegend	Identifies the chart legend.
VtChPartTypePlot	Identifies the chart plot.
VtChPartTypeSeries	Identifies a chart series.
VtChPartTypePoint	Identifies an individual data point.
VtChPartTypePointLabel	Identifies a data point label.
VtChPartTypeAxis	Identifies an axis.
VtChPartTypeAxisLabel	Identifies an axis label.
VtChPartTypeAxisTitle	Identifies an axis title.


Pen Property

Returns or sets a reference to a Pen object that describes the color and pattern of lines or edges on chart elements.

Syntax

object.Pen

The object placeholder represents an object expression that evaluates to an object in the Applies To list.


Pen Object

Describes the color and pattern of lines or edges on a chart.

Syntax

Pen


Cap Property

Returns or sets a value that determines how line ends are capped.

Syntax

object.Cap [ = type ]

The Cap property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
type	Integer. A VtPenCap constant that describes the line pen cap style.


Join Property

Returns or sets a value that determines how line segments are formed.

Syntax

object.Join [ = type ]

The Join property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
type	Integer. A VtPenJoin constant that describes the style of pen join.


Limit Property

Returns or sets the joint limit, in points, of the line.

Syntax

object.Limit [ = joint ]

The Limit property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
joint	Single. A joint limit as a multiple of the line width. If two lines meet at a sharp angle, a mitered join results in a corner point that extends beyond the actual corner. If the distance from the inner join point to the outer join point exceeds the value in this variable, the join automatically changes to a bevel.


Pen Object, GuideLinePen Property Example

The following example sets the pen attributes for a two-dimensional xy chart series. The GuideLinePen property returns a reference to a Pen object.

Private Sub Command1_Click()

' Set Guide Lines for 2D XY chart Series 1.

MSChart1.ChartType = VtChChartType2dXY

MSChart1.Plot.SeriesCollection.Item(1) _

.ShowGuideLine(VtChAxisIdX) = True

With _

MSChart1.Plot.SeriesCollection.Item(1).GuideLinePen

' Set Pen attributes.

.VtColor.Set 255, 255, 0

.Width = 10

.Style = VtPenStyleDashDot

.Join = VtPenRound

.Cap = VtPenCapRound

End With

End Sub


PercentAxisBasis Constants

VtChPercentAxisBasis provides methods of displaying percentage axes.

Constant	Description
VtChPercentAxisBasisMaxChart	The largest value in the chart is considered 100 percent and all other values on the chart are displayed as percentages of that value.
VtChPercentAxisBasisMaxRow	The largest value in each row is considered 100 percent and all other values in that row are displayed as percentages of that value.
VtChPercentAxisBasisMaxColumn	The largest value in each series is considered 100 percent and all other values in that series are displayed as percentages of that value.
VtChPercentAxisBasisSumChart	All values in the chart are added together, and that value is considered 100 percent. All other values are displayed as percentages of that value.
VtChPercentAxisBasisSumRow	All values in each row are added together and the total value for each row is considered 100 percent. All other values in that same row are displayed as percentages of that value. This is the basis for 100 percent stacked charts.
VtChPercentAxisBasisSumColumn	All values in each series are added together to give a total value for each series. All values are displayed as a percentage of their series total value.


PenCap Constants

VtPenCap provides methods for displaying line endings.

Constant	Description
VtPenCapButt	The line is squared off at the endpoint.
VtPenCapRound	A semicircle with the diameter of the line thickness is drawn at the end of the line.
VtPenCapSquare	The line continues beyond the endpoint for a distance equal to half the line thickness and is squared off.


PenJoin Constants

The VtPenJoin constants provide options for joining line segments in a series.

Constant	Description
VtPenJoinMiter	The outer edges of the two lines are extended until they meet.
VtPenJoinRound	A circular arc is drawn around the point where the two lines meet.
VtPenJoinBevel	The notch between the ends of two joining lines is filled.


PenStyle Constants

The VtPenStyle constants provide options for the pen used to draw chart lines.

Constant	Description
VtPenStyleNull	No pen is applied
VtPenStyleSolid	Solid line pen
VtPenStyleDashed	Dashed line pen
VtPenStyleDotted	Dotted line pen
VtPenStyleDashDot	Dash-dot line pen
VtPenStyleDashDotDot	Dash-dot-dot line pen
VtPenStyleDitted	Ditted line pen
VtPenStyleDashDit	Dash-ditted line pen
VtPenStyleDashDitDit	Dash-dit-dit line pen


PieWeightBasis Constants

The VtChPieWeightBasis constants provide options for displaying pie chart slices.

Constant	Description
VtChPieWeightBasisNone	All pies are drawn the same size.
VtChPieWeightBasisTotal	The slice values in each pie are totaled and the pie with the highest total identified. The size of each pie in the chart is determined by the ratio of its total value compared to the largest pie.
VtChPieWeightBasisSeries	The first column of data in the data grid holds the relative size index. In other words, if you have 5 categories, you can control the size of the pies representing each category by using the first column of the data grid to number the rows 1 through 5. The size of the pie is determined by the ratio of its first column value and the largest value in the first column. The pie containing the 1 is the largest pie; the one containing the 5 the smallest. It is most common to exclude this first column of data so that the values are not drawn as a pie slice.


PieWeightStyle Constants

The VtChPieWeightStyle constants provide options for displaying individual pies within a single chart.

Constant	Description
VtChPieWeightStyleArea	The area of the individual pies changes, based on their weighting.
VtChPieWeightStyleDiameter	The diameter of the individual pies changes, based on their weighting.


Plot Property

Returns a reference to a Plot object that describes the area upon which a chart is displayed.

Syntax

object.Plot

The object placeholder represents an object expression that evaluates to an object in the Applies To list.


Plot Object

The area upon which a chart is displayed.

Syntax

Plot


AngleUnit Property

Returns or sets the unit of measure used for all chart angles.

Syntax

object.AngleUnit [ = unit]

The AngleUnit property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
unit	Integer. A VtAngleUnits constant describing the unit of measure. The angles can be measured in degrees, radians, or grads.


AutoLayout Property

Returns or sets a value that determines whether or not a Plot object is in manual or automatic layout mode.

Syntax

object.AutoLayout [ = boolean ]

The AutoLayout property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
boolean	A Boolean expression that specifies the layout mode, as described in Settings.
Settings

The settings for boolean are:

Setting	Description
True	The Plot object automatically determines the proper size and position of the plot based on the size and position of other elements.
False	The coordinates specified by Plot object's LocationRect property are used to position the plot.


BarGap Property

Returns or sets the spacing of two-dimensional bars or clustered three-dimensional bars within a category.

Syntax

object.BarGap [ = value]

The BarGap property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
value	Single. The bar spacing value. This is measured as a percentage of the bar width. A value of 0 results in the bars touching. A value of 100 means the gap between the bars is as wide as the bars.


Clockwise Property

Returns or sets a value that specifies whether pie charts are drawn in a clockwise direction.

Syntax

object.Clockwise [ = boolean]

The Clockwise property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
boolean	A Boolean expression that controls the direction used to draw pie charts, as described in Settings.
Settings

The settings for boolean are:

Setting	Description
True	Pie charts are drawn in a clockwise direction.
False	The charts are drawn in a counterclockwise direction.


DataSeriesInRow Property

Returns or sets a value that indicates whether series data is being read from a row or a column in a data grid associated with a chart.

Syntax

object.DataSeriesInRow [ = boolean]

The DataSeriesInRow property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
boolean	A Boolean expression that controls how series data is read, as described in Settings.
Settings

The settings for boolean are:

Setting	Description
True	Series data is being read from a row in a data grid.
False	Series data is being read from a column.


DefaultPercentBasis Property

Returns the default axis percentage basis for the chart.

Syntax

object.DefaultPercentBasis

The object placeholder represents an object expression that evaluates to an object in the Applies To list.

Return Value

The return value is an integer that specifies the default axis percentage basis.


DepthToHeightRatio Property

Returns or sets the percentage of the chart height to be used as the chart depth.

Syntax

object.DepthToHeightRatio [ = pctg]

The DepthToHeightRatio property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
pctg	Single. The chart height percentage.


Projection Property

Returns or sets the type of projection used to display the chart.

Syntax

object.Projection [ = type]

The Projection property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
type	Integer. A VtProjectionType constant used to describe the type of chart projection.


Sort Property (MSChart)

Returns or sets the type of sort order used in a pie chart.

Syntax

object.Sort [ = type]

The Sort property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
type	Integer. A VtSortType constant used to describe the plot sort order.


StartingAngle Property

Returns or sets the position where you want to start drawing pie charts.

Syntax

object.StartingAngle [ = angle]

The StartingAngle property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
angle	Single. This angle can be measured in degrees, radians, or grads, depending on the current AngleUnits setting. A value of 0 degrees indicates the 3 o'clock position. Setting the starting angle to 90 degrees moves the starting position to 12 o'clock if the Clockwise property is set to counterclockwise, or to 6 o'clock if it's set to clockwise. Valid values range from -360 to 360 degrees.


SubPlotLabelPosition Property

Returns or sets the position used to display a label on each pie in a chart.

object.SubPlotLabelPosition [ = pos]

The SubPlotLabelPosition property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
pos	Integer. A VtChSubPlotLabelLocationType constant used to describe the position of the chart label.


UniformAxis Property

Returns or sets a value that specifies whether the unit scale for all value axes in a chart is uniform.

Syntax

object.UniformAxis [ = boolean]

The UniformAxis property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
boolean	A Boolean expression that controls the unit scale, as described in Settings.
Settings

The settings for boolean are:

Setting	Description
True	The unit scale for all value axes is uniform.
False	The unit scale is not uniform. The unit scale is determined by the plot size and positioning set according to the AutoLayout or LocationRect property. If AutoLayout is True, the plot size and position are based on the size and position of other automatically laid out elements. If False, the coordinates specified by LocationRect are used to position the plot and determine the axes unit scale.


WidthToHeightRatio Property

Returns or sets the percentage of the chart height to be used as the chart width.

Syntax

object.WidthToHeightRatio [ = pctg]

The WidthToHeightRatio property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
pctg	Single. The chart height percentage.


XGap Property

Returns or sets the spacing of bars between divisions on the x axis. This space is measured as a percentage of the bar width.

Syntax

object.xGap [ = spacing]

The xGap property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
spacing	Single. The bar width percentage. A value of 0 results in the series of bars touching.


ZGap Property

Returns or sets the spacing of three-dimensional bars between divisions on the z axis. This space is measured as a percentage of the bar depth.

Syntax

object.zGap [ = spacing]

The zGap property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
spacing	Single. The bar depth percentage. A value of 0 results in the series of bars touching along the z axis.


Plot Object Example

The following example sets the chart viewing distance and axis division spacing.

Private Sub Command1_Click()

' Change the chart type to 3D Bar.

Form1.MSChart1.ChartType = VtChChartType3dBar

With Form1.MSChart1.Plot

' Changes 3d bar chart's viewing.

.DepthToHeightRatio = 2

.WidthToHeightRatio = 2

' Changes the spacing between divisions on the

' X-Axis.

.xGap = 0

' Changes the spacing between divisions on the

' Z-Axis.

.zGap = 0.8

End With

End Sub


PlotActivated Event

Occurs when the user double clicks the chart plot.

Syntax

Private Sub object_PlotActivated ( mouseFlag As Integer, cancel As Integer )

The PlotActivated event syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
mouseFlag	Integer. Indicates whether a key is held down when the mouse button is clicked, as described in Settings.
cancel	Integer. This argument is not used at this time.
Settings

The event handler determines if a key is held down when the mouse button is clicked and sets mouseFlag to:

Constants	Description
VtChMouseFlagShiftKeyDown	If the Shift key is held down.
VtChMouseFlagControlKeyDown	If the Control key is held down.


PlotBase Property

Returns a reference to a PlotBase object that describes the appearance of the area beneath a chart.

Syntax

object.PlotBase

The object placeholder represents an object expression that evaluates to an object in the Applies To list.


PlotBase Object

The area beneath a chart.

Syntax

PlotBase


BaseHeight Property

Returns or sets the height of the three-dimensional chart base in points.

Syntax

object.BaseHeight [ = height]

The BaseHeight property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
height	Single. The base height.


PlotBase Object Example

The following example sets the chart base parameters on a three-dimensional bar chart.

Private Sub Command1_Click()

' Change the chart type to 3D.

MSChart1.ChartType = VtChChartType3dBar

With Form1.MSChart1.Plot.PlotBase

' Change the base height.

.BaseHeight = 20

' Use the pattern style for base.

.Brush.Style = VtBrushStylePattern

.Brush.Index = VtBrushPatternHorizontal

.Brush.FillColor.Set 255, 160, 160

.Brush.PatternColor.Set 180, 180, 255

.Pen.Style = VtPenStyleSolid

.Pen.VtColor.Set 72, 72, 255

End With

End Sub


PlotSelected Event

Occurs when the user clicks the chart plot.

Syntax

Private Sub object_PlotSelected ( mouseFlag As Integer, cancel As Integer )

The PlotSelected event syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
mouseFlag	Integer. Indicates whether a key is held down when the mouse button is clicked, as described in Settings.
cancel	Integer. This argument is not used at this time.
Settings

The event handler determines if a key is held down when the mouse button is clicked and sets mouseFlag to:

Constants	Description
VtChMouseFlagShiftKeyDown	If the Shift key is held down.
VtChMouseFlagControlKeyDown	If the Control key is held down.


PlotUpdated Event

Occurs when the chart plot has changed.

Syntax

Private Sub object_PlotUpdated (updateFlags As Integer)

The PlotUpdated event syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
updateFlag	Integer. Provides information about the update of the plot, as described in Settings.
Settings

The following table lists the constants for updateFlag.

Constant	Description
VtChNoDisplay	Absence of update flags; the chart display is not affected. (Defined as 0.)
VtChDisplayPlot	Update will cause the plot to repaint.
VtChLayoutPlot	Update will cause the plot to lay out.
VtChDisplayLegend	Update will cause the legend to repaint.
VtChLayoutLegend	Update will cause the legend to lay out.
VtChLayoutSeries	Update will cause the series to lay out.
VtChPositionSection	A chart section has been moved or resized.


PointActivated Event

Occurs when the user double clicks on a data point.

Syntax

Private Sub object_PointActivated ( series As Integer, dataPoint As Integer, mouseFlag As Integer, cancel As Integer )

The PointActivated event syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
series	Integer. Identifies the series containing the data point.  Series are numbered in the order that their columns appear in the data grid, beginning with 1.
dataPoint	Integer. Identifies the data point's position in the series. Points are numbered in the order that their rows appear in the data grid, beginning with 1.
mouseFlag	Integer. Indicates whether a key is held down when the mouse button is clicked, as described in Settings.
cancel	Integer. This argument is not used at this time.
Settings

The event handler determines if a key is held down when the mouse button is clicked and sets mouseFlag to:

Constants	Description
VtChMouseFlagShiftKeyDown	If the Shift key is held down.
VtChMouseFlagControlKeyDown	If the Control key is held down.


PointLabelActivated Event

Occurs when the user double clicks a data point label.

Syntax

Private Sub object_PointLabelActivated ( series As Integer, dataPoint As Integer, mouseFlag As Integer, cancel As Integer )

The PointLabelActivated event syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
series	Integer. Identifies the series containing the data point.  Series are numbered in the order that their columns appear in the data grid, beginning with 1.
dataPoint	Integer. Identifies the data point's position in the series. Points are numbered in the order that their rows appear in the data grid, beginning with 1.
mouseFlag	Integer. Indicates whether a key is held down when the mouse button is clicked, as described in Settings.
cancel	Integer. This argument is not used at this time.
Settings

The event handler determines if a key is held down when the mouse button is clicked and sets mouseFlag to:

Constants	Description
VtChMouseFlagShiftKeyDown	If the Shift key is held down.
VtChMouseFlagControlKeyDown	If the Control key is held down.


PointLabelSelected Event

Occurs when the user clicks a data point label.

Syntax

Private Sub object_PointLabelSelected ( series As Integer, dataPoint As Integer, mouseFlag As Integer, cancel As Integer )

The PointLabelSelected event syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
series	Integer. Identifies the series containing the data point.  Series are numbered in the order that their columns appear in the data grid, beginning with 1.
dataPoint	Integer. Identifies the data point's position in the series. Points are numbered in the order that their rows appear in the data grid, beginning with 1.
mouseFlag	Integer. Indicates whether a key is held down when the mouse button is clicked, as described in Settings.
cancel	This argument is not used at this time.
Settings

The event handler determines if a key is held down when the mouse button is clicked and sets mouseFlag to:

Constants	Description
VtChMouseFlagShiftKeyDown	If the Shift key is held down.
VtChMouseFlagControlKeyDown	If the Control key is held down.


PointLabelUpdated Event

Occurs when a data point label has changed.

Syntax

Private Sub object_PointLabelUpdated (series As Integer, dataPoint As Integer, updateFlags As Integer)

The PointLabelUpdated event syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
series	Integer. Identifies the series containing the data point.  Series are numbered in the order that their columns appear in the data grid, beginning with 1.
dataPoint	Integer. Identifies the data point's position in the series. Points are numbered in the order that their rows appear in the data grid, beginning with 1.
updateFlag	Integer. Provides information about the update of the data point label, as described in Settings.
Settings

The following table lists the constants for updateFlag.

Constant	Description
VtChNoDisplay	Absence of update flags; the chart display is not affected. (Defined as 0.)
VtChDisplayPlot	Update will cause the plot to repaint.
VtChLayoutPlot	Update will cause the plot to lay out.
VtChDisplayLegend	Update will cause the legend to repaint.
VtChLayoutLegend	Update will cause the legend to lay out.
VtChLayoutSeries	Update will cause the series to lay out.
VtChPositionSection	A chart section has been moved or resized.


PointSelected Event

Occurs when the user clicks a data point.

Syntax

Private Sub object_PointSelected ( series As Integer, dataPoint As Integer, mouseFlag As Integer, cancel As Integer )

The PointSelected event syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
series	Integer. Identifies the series containing the data point. Series are numbered in the order that their columns appear in the data grid, beginning with 1.
dataPoint	Integer. Identifies the data point's position in the series. Points are numbered in the order that their rows appear in the data grid, beginning with 1.
mouseFlag	Integer. Indicates whether a key is held down when the mouse button is clicked, as described in Settings.
cancel	Integer. This argument is not used at this time.
Settings

The event handler determines if a key is held down when the mouse button is clicked and sets mouseFlag to:

Constants	Description
VtChMouseFlagShiftKeyDown	If the Shift key is held down.
VtChMouseFlagControlKeyDown	If the Control key is held down.


PointUpdated Event

Occurs when a data point has changed.

Syntax

Private Sub object_PointUpdated (series As Integer, dataPoint As Integer, updateFlags As Integer)

The PointUpdated event syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
series	Integer. Identifies the series containing the data point. Series are numbered in the order that their columns appear in the data grid, beginning with 1.
dataPoint	Integer. Identifies the data point's position in the series. Points are numbered in the order that their rows appear in the data grid, beginning with 1.
updateFlag	Integer. Provides information about the update of the data point, as described in Settings.
Settings

The following table lists the constants for updateFlag.

Constant	Description
VtChNoDisplay	Absence of update flags; the chart display is not affected. (Defined as 0.)
VtChDisplayPlot	Update will cause the plot to repaint.
VtChLayoutPlot	Update will cause the plot to lay out.
VtChDisplayLegend	Update will cause the legend to repaint.
VtChLayoutLegend	Update will cause the legend to lay out.
VtChLayoutSeries	Update will cause the series to lay out.
VtChPositionSection	A chart section has been moved or resized.


ProjectionType Constants

VtProjectionType provides viewpoint and perspective options for displaying and viewing a chart.

Constants	Description
VtProjectionTypePerspective	This provides the most realistic three-dimensional appearance. Objects farther away from you converge toward a vanishing point. This is the default projection.
VtProjectionTypeOblique	This is sometimes referred to as 2.5 dimensional. The chart does have depth, but the xy plane does not change when the chart is rotated or elevated.
VtProjectionTypeOrthogonal	Perspective is not applied in this three-dimensional view. The major advantage of using this type of projection is that vertical lines remain vertical, making some charts easier to read.


RandomFill Property

Indicates whether the data for a chart data grid was randomly generated.

Syntax

object.RandomFill [ = boolean]

The RandomFill property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
boolean	A Boolean expression that controls how data is generated, as described in Settings.
Settings

The settings for boolean are:

Setting	Description
True	Random data is used to draw the chart.
False	No random data is generated. The user provides the data for the chart.


Rect Property

Returns a reference to a Rect object that defines a coordinate location.

Syntax

object.Rect

The object placeholder represents an object expression that evaluates to an object in the Applies To list.


Rect Object

Defines a coordinate location.

Syntax

Rect


Min Property (MSChart)

Returns a reference to a Coor object that specifies the starting corner of a rectangle.

Syntax

object.Min

The object placeholder represents an object expression that evaluates to an object in the Applies To list.


Max Property (MSChart)

Returns a reference to a Coor object that specifies the ending corner of a rectangle.

Syntax

object.Max

The object placeholder represents an object expression that evaluates to an object in the Applies To list.


LocationRect Property

Returns a reference to a Rect object that specifies the location of the chart plot using x and y coordinates.

Syntax

object.LocationRect

The object placeholder represents an object expression that evaluates to an object in the Applies To list.

Remarks

The values of this property are used to position the plot if AutoLayout is False.

If this property is set, then the AutoLayout property is automatically set to False.


LocationRect Property, Rect Object Example

The following example sets the location of the chart plot using the LocationRect property that returns the Rect object.

Private Sub Command1_Click()

' Sets the location of the chart plot.

MSChart1.Plot.AutoLayout = False

With MSChart1.Plot.LocationRect

.Min.X = 0.4

.Min.Y = 0.4

.Max.X = 0.5

.Max.Y = 0.5

End With

End Sub


Repaint Property

Returns or sets a value that determines if the MSChart control is repainted after a change is made to the chart.

Syntax

object.Repaint [ = boolean]

The Repaint property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
boolean	A Boolean expression that controls whether the chart is repainted, as described in Settings.
Settings

The settings for boolean are:

Setting	Description
True	Refreshes the control.
False	Does not allow the control to repaint when a change is made to the chart. This is useful when several operations are performed on the chart and you do not want the chart to continually repaint during the process.


Row Property (MSChart)

Returns or sets a specific row in the current column of a data grid associated with a chart.

Syntax

object.Row [ = num]

The Row property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
num	Integer. A row number in the current column. Rows are numbered from top to bottom beginning with 1.


RowCount Property (MSChart)

Returns or sets how many rows there are in each column of a data grid associated with a chart.

Syntax

object.RowCount [ = count]

The RowCount property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
count	Integer. The number of rows in a column.


RowLabel Property (MSChart)

Returns or sets a data label that can be used to identify the current data point in a chart.

Syntax

object.RowLabel [ = text]

The RowLabel property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
text	String. The text for a row label. The label you specify sets the label for the data points identified by the Row property. This label appears along the category axis for most chart types and is used as the label for each individual pie in a pie chart. Label text may not be displayed if it is too long to fit on a chart.


RowLabelCount Property

Returns or sets the number of levels of labels on the rows in a data grid associated with a chart.

Syntax

object.RowLabelCount [ = count ]

The RowLabelCount property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
count	Integer. The number of label levels. Set this property to add or delete levels of labels from data grid rows. Row label levels are numbered from right to left, beginning at 1. Levels are added or subtracted from the left.


RowLabelIndex Property

Returns or sets a value that specifies a level of row labels.

Syntax

object.RowLabelIndex [ = index]

The RowLabelIndex property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
index	Integer. A row label level. To set a label on a row with more than one level of labels, or to return the current value for a label, you must first identify which level you want to affect. Row label levels are numbered from right to left, beginning at 1.


ScaleType Constants

VtChScaleType provides methods for plotting chart values and displaying the chart scale.

Constant	Description
VtChScaleTypeLinear	Chart values are plotted in a linear scale with values ranging from the minimum to the maximum chart range value.
VtChScaleTypeLogarithmic	Chart values are plotted in a logarithmic scale with values based on a specific log scale set with the logBase argument of this function.
VtChScaleTypePercent	Chart values are plotted in a linear scale with values based on the percentages of the chart range values.


SelectPart Method

Selects the specified chart part.

Syntax

object.SelectPart (part, index1, index2, index3, index4)

The SelectPart method syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
part	Integer. Specifies the chart part. Valid constants are VtChPartType.
index1	Integer. If part refers to a series or a data point, this argument specifies which series. Series are numbered in the order their corresponding columns appear in the data grid from left to right, beginning with 1. If part refers to an axis or axis label, this argument identifies the axis type with a VtChAxisId constant.
index2	Integer. If part refers to a data point, this argument specifies which data point in the series is identified by index1. Data points are numbered in the order their corresponding rows appear in the data grid from top to bottom, beginning with 1. If part refers to an axis, axis title, or axis label, this argument refers to the axis index which is currently not used. In this case, the only valid value for this argument is 1.
index3	Integer. If part refers to an axis label, this argument refers to the level of the label. Axis label levels are numbered from the axis out, beginning with 1. If part is not an axis label, the argument is unused.
index4	Integer. This argument is unused at this time.


SeriesCollection Collection

Provides information about the series that make up a chart.

Syntax

SeriesCollection(index)

The SeriesCollection collection syntax has these parts:

Part	Description
index	Identifies a specific series in the series collection.


Series Collection

A collection of chart series.

Syntax

Series (index)

The Series collection syntax has these parts:

Part	Description
index	Integer. Identifies the series of the chart. Series are identified in the order of data grid columns, beginning with 1.


Series, SeriesCollection Collections Example

The following example hides all the series in a chart.

Private Sub Command1_Click()

Dim series As Object

' Hides All Series.

For Each series In MSChart1.Plot.SeriesCollection

Series.Position.Hidden = True

Next

End Sub


Series Object

An item from a SeriesCollection collection that represents a group of data points on a chart.

Syntax

Series


GuidelinePen Property

Returns a reference to a Pen object that describes the pattern of line and color used to display guidelines.

Syntax

object.GuidelinePen

The object placeholder represents an object expression that evaluates to an object in the Applies To list.

Remarks

Setting this property automatically sets the ShowGuideLines property to True.


LegendText Property

Returns or sets the text that identifies the series in the legend of a chart.

Syntax

object.LegendText [ = text ]

The LegendText property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
text	String. The text that identifies the current series in the legend.
Remarks

By default, this text is the same as the Text property of the ColumnLabel object.


SecondaryAxis Property

Returns or sets a value that determines whether the series is charted on the secondary axis.

Syntax

object.SecondaryAxis [ = boolean]

The SecondaryAxis property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
boolean	A Boolean expression that controls whether the series is charted on the secondary axis, as described in Settings.
Settings

The settings for boolean are:

Setting	Description
True	The series is charted on the secondary axis.
False	The series is not charted on the secondary axis.


ShowGuideLines Property

Returns or sets a value that determines whether or not the connecting data point lines on a chart are displayed for a series.

Syntax

object.ShowGuideLines (axisId, index) [ = boolean ]

The ShowGuideLine property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
axisId	Integer. A VtChAxisId constant describing the series axis you want to set this property for.
index	Integer. An integer reserved for future use. For this version of MSChart control, 1 is the only valid value for this argument.
boolean	A Boolean expression that controls whether the series is charted on the secondary axis, as described in Settings.
Settings

The settings for boolean are:

Setting	Description
True	The series guidelines are displayed.
False	The series guidelines are not displayed.


ShowLine Property

Returns or sets a value that determines whether the lines connecting data points on a chart are visible.

Syntax

object.ShowLine [ = boolean]

The ShowLine property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
boolean	A Boolean expression that controls whether lines are displayed, as described in Settings.
Settings

The settings for boolean are:

Setting	Description
True	The lines connecting data points appear on the chart.
False	The data point lines do not appear.


TypeByChartType Method

Returns the series type used to draw a series if the chart type is set to chType. This method allows you to get the series type information based on a specified chart type without actually setting the chart type.

Syntax

object.TypeByChartType (chtype)

The TypeByChartType method syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
seriestype	Integer. A VtChSeriesType constant that describes the returned type used to display a series.
chtype	Integer. A VtChChartType constant describing the chart type.


Series Object Example

The following example sets smoothing for all series in a three-dimensional line chart.

Private Sub Command1_Click()

Dim Series As Object

' Change the chart type to 3D line and smoothing

' each line.

Form1.MSChart1.ChartType = VtChChartType3dLine

Form1.MSChart1.ColumnCount = 4

For Each Series In _

Form1.MSChart1.Plot.SeriesCollection

Series.SmoothingType = _

VtSmoothingTypeCubicBSpline

Series.SmoothingFactor = 10

Series.Pen.Style = 4

Next

End Sub


SeriesActivated Event

Occurs when the user double clicks a chart series. You can replace the standard user interface by canceling the event and displaying your own dialog box.

Syntax

Private Sub object_SeriesActivated ( series As Integer, mouseFlag As Integer, cancel As Integer )

The SeriesActivated event syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
series	Integer. Identifies the series containing the data point. Series are numbered in the order that their columns appear in the data grid, beginning with 1.
mouseFlag	Integer. Indicates whether a key is held down when the mouse button is clicked, as described in Settings.
cancel	Integer. This argument is not used at this time.
Settings

The event handler determines if a key is held down when the mouse button is clicked and sets mouseFlag to:

Constants	Description
VtChMouseFlagShiftKeyDown	If the Shift key is held down.
VtChMouseFlagControlKeyDown	If the Control key is held down.


SeriesColumn Property

Returns or sets the column position for the current series data.

Syntax

object.SeriesColumn [ = pos]

The SeriesColumn property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
pos	Integer. The position of the column containing the current series data. You can use this property to reorder series. If two series are assigned the same position, they are stacked.


SeriesMarker Property

Returns a reference to a SeriesMarker object that describes a marker that identifies all data points within one series on a chart.

Syntax

object.SeriesMarker

The object placeholder represents an object expression that evaluates to an object in the Applies To list.


SeriesMarker Object

Describes a marker that identifies all data points within one series on a chart.

Syntax

SeriesMarker


Auto Property (SeriesMarker)

Returns or sets a value that determines if the SeriesMarker object assigns the next available marker to all data points in the series.

Syntax

object.Auto [ = boolean]

The Auto property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
boolean	A Boolean expression that controls how markers are assigned, as described in Settings.
Settings

The settings for boolean are:

Setting	Description
True	The SeriesMarker object assigns the marker.
False	You can assign a custom marker.
Remarks

Set this property to False if you wish to change the series marker type.

This property is automatically set to False if the Marker property of the DataPoint object is set.


Show Property

Returns or sets a value that determines whether series markers are displayed on a chart.

Syntax

object.Show [ = boolean]

The Show property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
boolean	A Boolean expression that controls whether series markers are displayed, as described in Settings.
Settings

The settings for boolean are:

Setting	Description
True	Series markers are displayed
False	Series markers are not displayed.


SeriesMarker Object Example

The following example sets marker parameters for all series in a chart.

Private Sub Command1_Click()

Dim series As Object

' Show markers and unshow the lines for all series.

Form1.MSChart1.ChartType = VtChChartType2dLine

For Each series In _

Form1.MSChart1.Plot.SeriesCollection

Series.SeriesMarker.Show = True

Series.ShowLine = False

Next

End Sub


Position Property (MSChart)

Returns a reference to a SeriesPosition object that describes the location of one series in relation to other chart series.

Syntax

object.Position

The object placeholder represents an object expression that evaluates to an object in the Applies To list.


SeriesPosition Object

The location where a chart series is drawn in relation to other series. If all series have the same order (position), then they are stacked.

Syntax

SeriesPosition


Excluded Property

Returns or sets a value that determines whether a series is included on the chart.

Syntax

object.Excluded [ = boolean]

The Excluded property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
boolean	A Boolean expression that controls whether a series is included on the chart, as described in Settings.
Settings

The settings for boolean are:

Setting	Description
True	The chart is drawn without including the series.
False	The series is included when the chart is drawn. A series may be included in a chart, but still not display because it is Hidden.


Hidden Property (MSChart)

Returns or sets a value that determines whether a series is displayed on the chart.

Syntax

object.Hidden [ = boolean]

The Hidden property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
boolean	A Boolean expression that controls whether a series is displayed on the chart, as described in Settings.
Settings

The settings for boolean are:

Setting	Description
True	The chart is drawn without displaying the series. However, any space allocated for the series still exists.
False	The series is displayed.


Order Property

Returns or sets the position of the series in the chart. If the position in order matches another series, the series are stacked.

Syntax

object.Order [ = order]

The Order property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
order	Integer. The position order.


StackOrder Property

Returns or sets in what position the current series is drawn if it is stacked with other series.

Syntax

object.StackOrder [ = position]

The StackOrder property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
position	Integer. The order of the series if stacked with other series. Lower stack orders are on the bottom of the stack.


SeriesSelected Event

Occurs when the user clicks a chart series.

Syntax

Private Sub object_SeriesSelected ( series As Integer, mouseFlag As Integer, cancel As Integer )

The SeriesSelected event syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
series	Integer. Identifies the series containing the data point. Series are numbered in the order that their columns appear in the data grid, beginning with 1.
mouseFlag	Integer. Indicates whether a key is held down when the mouse button is clicked, as described in Settings.
cancel	Integer. This argument is not used at this time.
Settings

The event handler determines if a key is held down when the mouse button is clicked and sets mouseFlag to:

Constants	Description
VtChMouseFlagShiftKeyDown	If the Shift key is held down.
VtChMouseFlagControlKeyDown	If the Control key is held down.


SeriesType Property

Returns or sets the type used to display the current series.

Syntax

object.SeriesType [ = type]

The SeriesType property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
type	Integer. A VtChSeriesType constant describing the method used to display the series. You must select the series to change using the Column property before using the SeriesType property.


SeriesType Constants

The VtChSeriesType constants provide options for types of series.

Constant	Series Type
VtChSeriesType3dBar	3D Bar
VtChSeriesType2dBar	2D Bar
VtChSeriesType3dLine	3D Line
VtChSeriesType2dLine	2D Line
VtChSeriesType3dArea	3D Area
VtChSeriesType2dArea	2D Area
VtChSeriesType3dStep	3D Step
VtChSeriesType2dStep	2D Step
VtChSeriesType2dXY	XY
VtChSeriesType2dPie	2D Pie


SeriesUpdated Event

Occurs when a chart series has changed.

Syntax

Private Sub object_SeriesUpdated (series As Integer, updateFlags As Integer)

The SeriesUpdated event syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
series	Integer. Identifies the series containing the data point. Series are numbered in the order that their columns appear in the data grid, beginning with 1.
updateFlags	Integer. Provides information about the update of the series, as described in Settings.
Settings

The following table lists the constants for updateFlags.

Constant	Description
VtChNoDisplay	Absence of update flags; the chart display is not affected. (Defined as 0.)
VtChDisplayPlot	Update will cause the plot to repaint.
VtChLayoutPlot	Update will cause the plot to lay out.
VtChDisplayLegend	Update will cause the legend to repaint.
VtChLayoutLegend	Update will cause the legend to lay out.
VtChLayoutSeries	Update will cause the series to lay out.
VtChPositionSection	A chart section has been moved or resized.


Shadow Property

Returns a reference to a Shadow object that describes the appearance of a shadow on chart elements.

Syntax

object.Shadow

The object placeholder represents an object expression that evaluates to an object in the Applies To list.


Shadow Object

Holds information about the appearance of a shadow on a chart element.

Syntax

Shadow


Shadow Object Example

The following example sets a shadow on a chart backdrop title.

Private Sub Command1_Click()

' Show shadow for title.

With Form1.MSChart1.Title

.Location.Visible = True

.Text = "Chart Title"

End With

With Form1.MSChart1.Title.Backdrop.Frame

.Width = 1

.FrameColor.Set 255, 0, 0

.Style = VtFrameStyleSingleLine

End With

With Form1.MSChart1.Title.Backdrop.Shadow

.Style = VtShadowStyleDrop

.Offset.x = 10

.Offset.y = 10

End With

End Sub


ShadowStyle Constants

The VtShadowStyle constants provides shadow options.

Constant	Description
VtShadowStyleNull	No shadow.
VtShadowStyleDrop	Drop shadow.


ShowLegend Property

Returns or sets a value that indicates whether a legend is visible for a chart.

Syntax

object.ShowLegend [ = boolean]

The ShowLegend property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
boolean	A Boolean expression that controls whether a legend is displayed on the chart, as described in Settings.
Settings

The settings for boolean are:

Setting	Description
True	The legend appears on the chart in the position indicated by the Location object.
False	The legend is not displayed on the chart. The default legend location is to the right side of the chart.
Remarks

The default legend location is to the right side of the chart.


SortType Constants

The VtSortType constants provide options for sorting pie charts.

Constant	Description
VtSortTypeNone	Pie slices are drawn in the order the data appears in the data grid.
VtSortTypeAscending	Pie slices are drawn, in order, from the smallest to the largest slice, starting at the defined starting angle and in the defined plot direction.
VtSortTypeDescending	Pie slices are drawn, in order, from the largest to the smallest slice, starting at the defined starting angle and in the defined plot direction.


Stacking Property

Sets a value that determines whether all the series in the chart are stacked.

Syntax

object.Stacking [ = boolean]

The Stacking property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
boolean	A Boolean expression that controls whether all chart series are stacked, as described in Settings.
Settings

The settings for boolean are:

Setting	Description
True	All chart series are stacked.
False	Chart series are not stacked.
Remarks

The default legend location is to the right side of the chart.


StatLine Property

Returns a reference to a StatLine object that describes how statistic lines are displayed on a chart.

Syntax

object.StatLine

The object placeholder represents an object expression that evaluates to an object in the Applies To list.


StatLine Object

Describes how statistic lines are displayed on a chart.

Syntax

StatLine


Flag Property

Returns or sets which statistic lines are being displayed for a series.

Syntax

object.Flag [ = lines]

The Flag property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
lines	Integer. A VtChStats constant used to describe the stat line. If more than one statistics line is displayed, the constants are combined with an OR operator.


Style Property (StatLine)

Returns or sets the line type used to display the statistic line.

Syntax

object.Style (type )[ = style]

The Style property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
type	Integer. A VtChStats constant used to describe the line type.
style	Integer. A VtPenStyle constant used to describe the stat line style.


StatLine Object Example

The following example sets the color and pen parameters for a chart statistics line.

Private Sub Command1_Click()

' Show all statistic lines for series 2.

Form1.MSChart1.chartType = VtChChartType2dLine

With Form1.MSChart1.plot.SeriesCollection._

Item(2).StatLine

.VtColor.Set 128, 128, 255

.Flag = VtChStatsMinimum Or VtChStatsMaximum _

Or VtChStatsMean Or VtChStatsStddev Or _

VtChStatsRegression

.Style(vtChStatsMinimum) = VtPenStyleDotted

.width = 2

End With

End Sub


StatsType Constants

The VtChStats constants provide methods of displaying statistic lines on a chart.

Constant	Description
VtChStatsMinimum	Shows the minimum value in the series.
VtChStatsMaximum	Shows the maximum value in the series.
VtChStatsMean	Shows the mathematical mean of the values in the series.
VtChStatsStddev	Shows the standard deviation of the values in the series.
VtChStatsRegression	Shows a trend line indicated by the values in a series.


SubPlotLabelLocationType Constants

The VtSubPlotLabelLocationType constants provide methods for displaying the subplot label.

Constant	Description
VtChSubPlotLabelLocationTypeNone	No subplot label is displayed.
VtChSubPlotLabelLocationTypeAbove	The subplot label is displayed above the pie.
VtChSubPlotLabelLocationTypeBelow	The subplot label is displayed below the pie.
VtChSubPlotLabelLocationTypeCenter	The subplot label is centered on the pie.


TextLayout Property

Returns a reference to a TextLayout object that describes text positioning and orientation.

Syntax

object.TextLayout

The object placeholder represents an object expression that evaluates to an object in the Applies To list.


TextLayout Object

Represents text positioning and orientation.

Syntax

TextLayout


WordWrap Property( MSChart)

Returns or sets a value that determines whether text wraps.

Syntax

object.WordWrap [ = boolean ]

The WordWrap property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
boolean	A Boolean expression that determines whether text wraps, as described in Settings.
Settings

The settings for boolean are:

Setting	Description
True	Text wraps.
False	Text does not wrap.


HorzAlignment Property

Returns or sets the method of horizontal alignment of text.

object.HorzAlignment [ = type]

The HorzAlignment property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
type	Integer. A VtHorizontalAlignment constant used to describe the horizontal alignment method of text.


Orientation Property (MSChart)

Returns or sets the method of orientation for text.

Syntax

object.Orientation [ = type]

The Orientation property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
type	Integer. A VtOrientation constant used to describe the orientation method.


VertAlignment Property

Returns or sets the method used to vertically align text.

Syntax

object.VertAlignment [ = type]

The VertAlignment property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
type	Integer. A VtVerticalAlignment constant used to describe the vertical alignment method of text.


TextLayout Object Example

The following example sets the title text position and orientation for a chart.

Private Sub Command1_Click()

' Sets the title text position and orientation.

With Form1.MSChart1.Title

.Location.Visible = True

.Location.LocationType = VtChLocationTypeLeft

.Text = "Title TextLayout"

End With

With Form1.MSChart1.Title.TextLayout

.Orientation = VtOrientationUp

.HorzAlignment = VtHorizontalAlignmentCenter

.VertAlignment = VtVerticalAlignmentCenter

End With

End Sub


TextLengthType Property

Returns or sets a value that specifies how text is drawn to optimize the appearance either on the screen or printed page.

Syntax

object.TextLengthType [ = type]

The TextLengthType property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
type	Integer. A VtTextLengthType constant indicating the method used to draw text.


TextLengthType Constants

The VtTextLengthType constants provide options for optimizing text layout for the screen or for the printer.

Constant	Description
VtTextLengthTypeVirtual	Choose this constant to use TrueType virtual font metrics to optimize text layout for printing. TrueType virtual font metrics may not be very accurate for text displayed on the screen. Text displayed on the screen may be a larger or smaller than the virtual metrics requested. Larger text may not fit where it is supposed to and part of a character, a whole character, or even in some cases words may be clipped.
VtTextLengthTypeDevice	Choose this constant to optimize text layout for the screen. Text in charts laid out for screen display always fits correctly within its chart area. The printed text is generally a bit smaller and so the text may appear in slightly different places.


TextOutputType Constants

The VtTextOutputType constants provide methods of outputting text.

Constant	Description
VtTextOutputTypeHardware	Device context type Null.
VtTextOutputTypePolygon	Device context type Metafile.


Tick Property

Returns a reference to a Tick object that describes a marker indicating a division along a chart axis.

Syntax

object.Tick

The object placeholder represents an object expression that evaluates to an object in the Applies To list.


Tick Object

A marker indicating a division along a chart axis.

Syntax

Tick


Length Property (MSChart)

Returns or sets the length of axis tick marks, measured in points.

Syntax

object.Length [ = length]

The Length property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
length	Integer. The axis tick mark length.


Tick Object Example

The following example sets the tick length and style for the y axis on a chart.

Private Sub Command1_Click()

' Set the tick for y axis.

With Form1.MSChart1.Plot.Axis(VtChAxisIdY, 1).Tick

.Length = 20

.Style = VtChAxisTickStyleOutside

End With

End Sub


Title Property (MSChart)

Reference to a Title object that describes the text used to title a chart.

Syntax

object.Title

The object placeholder represents an object expression that evaluates to an object in the Applies To list.


Title Object

Text identifying the chart.

Syntax

Title


TitleActivated Event

Occurs when the user double clicks the chart title. You can replace the standard user interface by canceling the event and displaying your own dialog box.

Syntax

Private Sub object_TitleActivated ( mouseFlag As Integer, cancel As Integer )

The TitleActivated event syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
mouseFlag	Integer. Indicates whether a key is held down when the mouse button is clicked, as described in Settings.
cancel	Integer. This argument is not used at this time.
Settings

The event handler determines if a key is held down when the mouse button is clicked and sets mouseFlag to:

Constants	Description
VtChMouseFlagShiftKeyDown	If the SHIFT key is held down.
VtChMouseFlagControlKeyDown	If the CONTROL key is held down.


TitleSelected Event

Occurs when the user clicks the chart title.

Syntax

Private Sub object_TitleSelected (mouseFlag As Integer, cancel As Integer)

The TitleSelected event syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
mouseFlag	Integer. Indicates whether a key is held down when the mouse button is clicked, as described in Settings.
cancel	Integer. This argument is not used at this time.
Settings

The event handler determines if a key is held down when the mouse button is clicked and sets mouseFlag to:

Constants	Description
VtChMouseFlagShiftKeyDown	If the SHIFT key is held down.
VtChMouseFlagControlKeyDown	If the CONTROL key is held down.


TitleText Property

Returns or sets the text displayed as the chart title.

Syntax

object.TitleText [ = text]

The TitleText property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
text	The text used to display a chart title.
Remarks

This property provides a simple means to set or return the chart title. This property is functionally identical to using MSChart.Title.Text.


TitleUpdated Event

Occurs when the chart title has changed.

Syntax

Private Sub object_TitleUpdated (updateFlags As Integer)

The TitleUpdated event syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
updateFlags	Provides information about the update of the title, as described in Settings.
Settings

The following table lists the constants for updateFlags.

Constant	Description
VtChNoDisplay	Absence of update flags; the chart display is not affected. (Defined as 0.)
VtChDisplayPlot	Update will cause the plot to repaint.
VtChLayoutPlot	Update will cause the plot to lay out.
VtChDisplayLegend	Update will cause the legend to repaint.
VtChLayoutLegend	Update will cause the legend to lay out.
VtChLayoutSeries	Update will cause the series to lay out.
VtChPositionSection	A chart section has been moved or resized.


ToDefaults Method

Returns the chart to its initial settings.

Syntax

object.ToDefaults

The object placeholder represents an object expression that evaluates to an object in the Applies To list.


TwipsToChartPart Method

Identifies a chart part by using the x and y set of coordinates on to identify that part.

Syntax

object.TwipsToChartPart (xVal, yVal, part, index1, index2, index3, index4)

The TwipsToChartPart method syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
xVal,yVal	Long. The horizontal and vertical coordinates of the point.
part	Integer. A VtChPartType constant that identifies the chart part that is located at the xVal and yVal coordinates.
index1	Integer. If part refers to a series or a data point, this argument specifies which series. Series are numbered in the order their corresponding columns appear in the data grid from left to right, beginning with 1. If part refers to an axis or axis label, this argument identifies the axis type using the VtChAxisId constant.
index2	Integer. If part refers to a data point, this argument specifies which data point in the series identified by index1. Data points are numbered in the order their corresponding rows appear in the data grid from top to bottom, beginning with 1. If part refers to an axis, axis title, or axis label, this argument refers to the axis index which is currently not used. In this case, the only valid value for this argument is 1.
index3	Integer. If part refers to an axis label, this argument refers to the level of the label. Axis label levels are numbered from the axis out, beginning with 1. If part is not an axis label, the argument is unused.
index4	Integer. This argument is unused at this time.


ValueScale Property

Returns a reference to a ValueScale object that describes the scale used to display a value axis.

Syntax

object.ValueScale

The object placeholder represents an object expression that evaluates to an object in the Applies To list.


ValueScale Object

Scale used to display a value axis.

Syntax

ValueScale


Auto Property (ValueScale)

Returns or sets a value that determines whether automatic scaling is used to draw the value axis.

Syntax

object.Auto [ = boolean]

The Auto property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
boolean	A Boolean expression that determines whether automatic scaling is used, as described in Settings.
Settings

The settings for boolean are:

Setting	Description
True	The scale is automatically set based on the data being charted.
False	The values in the  Minimum, Maximum, MajorDivisions and MinorDivisions properties are used to scale the axis.


MajorDivision Property

Returns or sets the number of major divisions displayed on the axis.

Syntax

object.MajorDivision [ = num]

The MajorDivision property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
num	Integer. Number of divisions.
Remarks

If this property is set, then the ValueScale object's Auto property is automatically set to False.


Maximum Property

Returns or sets the highest or ending value on the chart value axis.

Syntax

object.Maximum [ = value]

The Maximum property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
value	Double. The highest axis value.
Remarks

If this property is set, then the ValueScale object's Auto property is automatically set to False.

The Maximum property should be set before the Minimum property to avoid a chart display error.


Minimum Property

Returns or sets the lowest or beginning value on the chart value axis.

Syntax

object.Minimum [ = value]

The Minimum property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
value	Double. The lowest axis value.
Remarks

If this property is set, then the ValueScale object's Auto property is automatically set to False.

The Maximum property should be set before the Minimum property to avoid a chart display error.


MinorDivision Property

Returns or sets the number of minor divisions displayed on the axis.

Syntax

object.MinorDivision [ = num]

The MinorDivision property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
num	Integer. Number of minor divisions.
Remarks

If this property is set, then the ValueScale object's Auto property is automatically set to False.


ValueScale Object Example

The following example sets the major and minor grid line color for a two-dimensional bar chart using the ValueScale object.

Private Sub Command1_Click()

' Set chart type to 2d bar.

Form1.MSChart1.ChartType = VtChChartType2dBar

' Use manual scale to display y axis (value axis).

With _

Form1.MSChart1.Plot.Axis(VtChAxisIdY).ValueScale

.Auto = False

.MajorDivision = 2

.MinorDivision = 5

End With

' Show major grid line in red and minor grid line

' in blue.

With Form1.MSChart1.Plot.Axis(VtChAxisIdY).AxisGrid

.MajorPen.VtColor.Set 255, 0, 0

.MajorPen.Width = 4

.MinorPen.VtColor.Set 0, 0, 255

.MinorPen.Width = 2

End With

End Sub


VerticalAlignment Constants

The VtVerticalAlignment constants provide methods of vertically aligning text.

Constant	Description
VtVerticalAlignmentTop	All lines of text are aligned at the top margin.
VtVerticalAlignmentBottom	All lines of text are aligned at the bottom margin.
VtVerticalAlignmentCenter	All lines of text are centered vertically.


View3D Property

Returns a reference to a View3D object that describes the physical orientation of a three-dimensional chart.

Syntax

object.View3D

The object placeholder represents an object expression that evaluates to an object in the Applies To list.


View3D Object

Represents the physical orientation of a three-dimensional chart.

Syntax

View3D


Elevation Property

Returns or sets a value that describes the degree of elevation from which a three-dimensional chart is viewed.

Syntax

object.Elevation [ = degree]

The Elevation property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
degree	Single. The degree of elevation.  Elevation can be any number from 0 to 90 degrees. If you set the elevation to 90 degrees, you look directly down onto the top of the chart. If you set the elevation to 0, you look directly at the side of the chart. The default elevation is 30 degrees. By default, degrees are used to measure elevation. However, these settings use the current settings for the AngleUnits property. The other options are: Grads and Radians.


Rotation Property

Returns or sets a value that describes the degree of rotation from which a three-dimensional chart is viewed.

Syntax

object.Rotation [ = degree]

The Rotation property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
degree	Single. The degree of rotation. Rotation can range from 0 to 360 degrees. By default, degrees are used to measure rotation. However, these settings use the current settings for the AngleUnits property. The other options are: Grads and Radians.


Set Method (View3D)

Sets the rotation and degree of elevation for a three-dimensional chart.

Syntax

object.Set (rotation, elevation )

The Set method syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
rotation	Single. The degree of rotation. Rotation can range from 0 to 360 degrees. By default, degrees are used to measure rotation. However, these settings use the current settings for the AngleUnits property. The other options are: Grads and Radians.
degree	Single. The degree of elevation.  Elevation can be any number from 0 to 90 degrees. If you set the elevation to 90 degrees, you look directly down onto the top of the chart. If you set the elevation to 0, you look directly at the side of the chart. The default elevation is 30 degrees. By default, degrees are used to measure elevation. However, these settings use the current settings for the AngleUnits property. The other options are: Grads and Radians.


View3D Object Example

The following example sets the chart elevation and rotation for a three-dimensional bar chart using the view object.

Private Sub Command1_Click()

' Set the chart type to 3d bar.

Form1.MSChart1.ChartType = VtChChartType3dBar

With Form1.MSChart1.Plot.View3d

.Elevation = 90	' Look directly down onto the

' top of the chart.

.Rotation = 90

End With

End Sub


VtColor Property

Returns a reference to a VtColor object that describes a drawing color in a chart.

Syntax

object.VtColor

The object placeholder represents an object expression that evaluates to an object in the Applies To list.


VtColor Object

Describes a drawing color in a chart.

Syntax

VtColor


Automatic Property

Returns or sets a value that determines whether the color is calculated automatically. This is only used for edge pens on chart elements.

Syntax

object.Automatic [ = boolean]

The Automatic property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
boolean	A Boolean expression that determines whether the color is calculated automatically, as described in Settings.
Settings

The settings for boolean are:

Setting	Description
True	Color automatically picks up the brush color used on the chart series.
False	The color is determined based on the settings of Value.


Blue Property

Returns or sets the blue component of the RGB value in a chart.

Syntax

object.Blue [=b]

The Blue property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
b	Integer. The blue value.
Remarks

RGB specifies the relative intensity of red, green, and blue to cause a specific color to be displayed. The valid range for a normal RGB color is 0 to 16,777,215. The value for any argument to RGB that exceeds 255 is assumed to be 255.


Green Property

Returns or sets the green component of the RGB value in a chart.

Syntax

object.Green [=g]

The Green property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
g	Integer. The green value.
Remarks

RGB specifies the relative intensity of red, green, and blue to cause a specific color to be displayed. The valid range for a normal RGB color is 0 to 16,777,215. The value for any argument to RGB that exceeds 255 is assumed to be 255.


Red Property

Returns or sets the red component of the RGB value in a chart.

Syntax

object.Red [=r]

The Red property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
r	Integer. The red value.
Remarks

RGB specifies the relative intensity of red, green, and blue to cause a specific color to be displayed. The valid range for a normal RGB color is 0 to 16,777,215. The value for any argument to RGB that exceeds 255 is assumed to be 255.


Set Method (VtColor)

Sets the red, green and blue values of the VtColor object.

Syntax

object.Set ( red,green,blue)

The Set method syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
red, green, blue	Integer. The values for the red, green and blue components of color.
Remarks

RGB specifies the relative intensity of red, green, and blue to cause a specific color to be displayed. The valid range for a normal RGB color is 0 to 16,777,215. The value for any argument to RGB that exceeds 255 is assumed to be 255.


VtColor Object, FillColor Property Example

The following example sets the fill color for a chart backdrop brush. The FillColor property returns a reference to the VtColor object.

Private Sub Command1_Click()

' Sets Backdrop to Fill - Brush Style.

MSChart1.Backdrop.Fill.Style = VtFillStyleBrush

' Sets chart fill color to red.

With MSChart1.Backdrop.Fill.Brush.FillColor

.Red = 255	' Use properties to set color.

.Green = 0

.Blue = 0

End With

End Sub


VtFont Property

Returns a reference to a VtFont object that describes the font used to display chart text.

Syntax

object.VtFont

The object placeholder represents an object expression that evaluates to an object in the Applies To list.


VtFont Object

The font used to display chart text.

Syntax

VtFont


Effect Property

Returns or sets the font effects in a chart.

Syntax

object.Effect [ = effects ]

The Effect property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
effects	Integer. A VtFontEffect constant describing the font effect.


Name Property (VtFont)

Returns or sets the name of the font. This is the default property of the VtFont object.

Syntax

object.Name [ = text ]

The Name property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
text	Integer. The text containing the font name.


VtFontObject Example

The following example sets the font parameters for a chart title.

Private Sub Command1_Click()

' Make Chart Title visible.

MSChart1.Title.Location.Visible = True

' Set font for Chart Title.

With MSChart1.Title.VtFont

.Name = "Times New Roman"

.Size = 18

.Style = VtfontStyleBoldItalic

' Use both StrikeThrough and Underline in the

' text.

.Effect = VtFontEffectStrikeThrough Or _

VtFontEffectUnderline

' Set text color to Blue.

.VtColor.Set 0, 0, 255

End With

End Sub


Wall Property

Returns a reference to a Wall object that describes the planar area depicting the y axes on a three-dimensional chart.

Syntax

object.Wall

The object placeholder represents an object expression that evaluates to an object in the Applies To list.


Wall Object

A planar area depicting the y axes on a three-dimensional chart.

Syntax

Wall


Wall Object Example

The following example displays a colored wall for a three-dimensional chart.

Private Sub Command1_Click()

' Displays a colored wall for a 3D chart.

Form1.MSChart1.ChartType = VtChChartType3dBar

With Form1.MSChart1.Plot.Wall

.Brush.Style = VtBrushStylePattern

.Brush.Index = VtBrushPatternChecks

.Brush.FillColor.Set 255, 120, 120

.Brush.PatternColor.Set 120, 120, 0

.Width = 20

End With

End Sub


Weighting Property

Returns a reference to a Weighting object that describes the size of a pie in relation to other pies in the same chart.

Syntax

object.Weighting

The object placeholder represents an object expression that evaluates to an object in the Applies To list.


Weighting Object

Represents the size of a pie in relation to other pies in the same chart.

Syntax

Weighting


Basis Property

Returns or sets the type of weighting used to determine pie size on a chart.

Syntax

object.Basis [ = type ]

The Basis property syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
type	A VtChPieWeightBasis constant that identifies the weighting type.


Set Method (Weighting)

Sets the basis and style of the Weighting object.

Syntax

object.Set ( basis, style )

The Set method syntax has these parts:

Part	Description
object	An object expression that evaluates to an object in the Applies To list.
basis	A VtChPieWeightBasis constant that identifies the weighting type.
style	A VtChPieWeightStyle constant that identifies the weighting factor method.


Weighting Object Example

The following example shows the weighting of a pie chart.

Private Sub Command1_Click()

' Show the weighting of the pie.

Form1.MSChart1.ChartType = VtChChartType2dPie

With Form1.MSChart1.Plot.Weighting

.Basis = VtChPieWeightBasisTotal

.Style = VtChPieWeightStyleArea

End With

End Sub


EdgePen Property

Returns the Pen object used to draw the edge of the data point on a chart.

Syntax

object.EdgePen

The object placeholder represents an object expression that evaluates to an object in the Applies To list.


FrameColor Property

Returns a reference to a VtColor object that specifies the color used to frame a chart element.

Syntax

object.FrameColor

The object placeholder represents an object expression that evaluates to an object in the Applies To list.


SpaceColor Property

Returns a reference to a VtColor object that specifies the color used fill the space between double frames around a chart element.

Syntax

object.SpaceColor

The object placeholder represents an object expression that evaluates to an object in the Applies To list.


Count Method

Returns the number of objects in a collection.

Syntax

object.Count

The object placeholder represents an object expression that evaluates to an object in the Applies To list.


Error Messages (MSChart Control)

The MSChart control's errors that occur during program execution are handled like other errors. You must write your own error handling routine to trap and manage errors.

The following table list the errors that can be trapped by exception handling.

Error Name	Explanation
GetNotSupported	Attempted to read a write-only property.
InvalidPropertyValue	Value is not appropriate for the property used.
SetNotSupported	Attempted to write to a read-only property.
VtChError	Function failed with a non-specific error.
VtChErrorInvalidAxis	One of the arguments in a method is a reference to an axis that does not exist on the chart.
VtChErrorInvalidHandle	Invalid chart handle passed.
VtChErrorInvalidSeriesNumber	One of the arguments in a method is a reference to a series that does not exist on the chart.
VtChErrorNoData	Data necessary for the completion of the task is unavailable.
VtChErrorRestrictedVersion	The requested feature is not available in this version of the product.
VtErrorActionCanceled	User canceled operation. The user clicked outside the menu instead of selecting an item.
VtErrorArchivePointerMismatch	Tried to load a pointer into a reference.
VtErrorArchiveTypeMismatch	Encountered unexpected class type.
VtErrorArchiveVersion	Tried to load incompatible version.
VtErrorBufferTooSmall	String buffer is not large enough to hold the requested string. String has been truncated to fit the buffer.
VtErrorCannotOpenFile	Unable to open the requested file.
VtErrorCopyingObject	Failed to copy object.
VtErrorCorruptArchive	Persistent storage is corrupted.
VtErrorCorruptData	An internal error indicating that the MSChart control has encountered corrupt data and is unable to continue the requested action.
VtErrorCreateWindow	Could not create window.
VtErrorDefaultFontSubstituted	Default substituted for requested font.
VtErrorDeletingDeletedObject	An internal error indicating that the MSChart control attempted to delete an object that has already been deleted.
VtErrorDeletingUsedObject	An internal error indicating that the MSChart control attempted to delete an object that is still in use.
VtErrorDisplay	The MSChart control is unable to properly communicate with display drivers.
VtErrorDuplicateObject	Encountered duplicate object.
VtErrorDuplicateSymbol	Duplicate symbol.
VtErrorIconNotFound	Could not load icon.
VtErrorIdentifierTooBig	Identifier is too large.
VtErrorInvalidArgument	One of the function arguments was bad.
VtErrorInvalidFont	Requested font description is invalid.
VtErrorInvalidFontName	Requested font name is not available.
VtErrorInvalidIndex	Given index is out of bounds.
VtErrorInvalidObject	Object is uninitialized or invalid.
VtErrorInvalidRequest	The requested action is inappropriate or otherwise invalid.
VtErrorInvalidSyntax	Encountered invalid syntax.
VtErrorInvalidTypeConversion	Requested type conversion is not supported.
VtErrorLoadPicture	Could not load requested picture.
VtErrorNoDisplayResources	The MSChart control does not have enough display resources to properly display the chart.
VtErrorNoMemory	There is not enough memory to accomplish the requested action.
VtErrorNotFound	Cannot find the item for which the function is looking.
VtErrorNotImplemented	Feature is not yet implemented.
VtErrorOSVersion	Version of Windows is not supported.
VtErrorStreamIo	An error was encountered when trying to read or write a file.
VtErrorTooSmall	The returned result is longer than the return buffer size. A NULL string is placed in the buffer.
VtErrorUnableToLoadString	Unable to load a string; the string may have been too long.
VtErrorUnexpectedEOS	Encountered unexpected end of string.
VtErrorUnrecognizedFunction	Encountered unrecognized function.
VtErrorUserIo	An attempt to write a file to a user created function failed.
VtFail	A general failure error.
VtOk	No error occurred.


Change Event (placeholder)


Click Event (placeholder)


DblClick Event (placeholder)


DragDrop Event (placeholder)


DragOver Event (placeholder)


KeyDown Event (placeholder)


KeyPress Event (placeholder)


KeyUp Event (placeholder)


MouseDown Event (placeholder)


MouseMove Event (placeholder)


MouseUp Event (placeholder)


OLECompleteDragEvent (placeholder)


OLEDragDrop Event (placeholder)


OLEDragOver Event (placeholder)


OLEGiveFeedback Event (placeholder)


OLESetData Event (placeholder)


OLEStartDrag Event (placeholder)


Refresh Method (placeholder)


OLEDrag Method (placeholder)


Appearance Property (placeholder)


BackColor Property (placeholder)


Caption Property (placeholder)


Enabled Property (placeholder)


Font Property (placeholder)


ForeColor Property (placeholder)


IntegralHeight Property (placeholder)


Locked Property (placeholder)


MouseIcon Property (placeholder)


MousePointer Property (placeholder)


OLEDragMode Property (placeholder)


OLEDropMode Property (placeholder)


SelLength Property (placeholder)


SelStart Property (placeholder)


SelText Property (placeholder)


Style Property (placeholder)


Text Property (placeholder)


Keyword Not Found

The keyword you've selected can't be found in Visual Basic Help. It's possible that:

•	The keyword is misspelled

•	You selected too much or too little text

•	You asked for help on a word that is not a valid Visual Basic keyword.

The easiest way to get help on a specific keyword is to position the insertion point anywhere within the keyword you want help on and press F1. You do not need to select the keyword. In fact, if you select only a portion of the keyword, or more than a single word, Help will not find what you're looking for.

To use the built-in Help search dialog box, press the Help Topics button on the toolbar.

One option to possibly find what you're looking for is to view the ReadMe file that comes with Visual Basic. This document contains information regarding last-minute changes, additions, and deletions that did not make it into the final documentation.


Left, Top Properties (Placeholder)


Height, Width Properties (Placeholder)


Tag Property (Placeholder)


ToolTipText Property (Placeholder)


Count Property (Placeholder)


Item Method (Placeholder)


Hwnd Property (Placeholder)


TabStop Property (Placeholder)


Visible Property (Placeholder)


Picture Property (placeholder)


Max, Min Properties (placeholder)


Add Method (placeholder)


Clear Method (placeholder)


Container Property (placeholder)


Controls Collection (placeholder)


Copies Property (placeholder)


DataBinding Object (placeholder)


DataBindings Collection (placeholder)


Filename Property (placeholder)


FontBold, FontItalic, FontStrikeThru Properties (placeholder)


FontName Property (placeholder)


FontSize Property (placeholder)


GetData Method (placeholder)


GetFormat Method (placeholder)


HelpFile Property (placeholder)


Item Property (placeholder)


Remove Method (placeholder)


SetData Method (placeholder)


Align Property (placeholder)


DragIcon Property (placeholder)


DragMode Property (placeholder)


HelpContextID Property (placeholder)


TabIndex Property (placeholder)


Alignment Constants (placeholder)


Border Property Constants (placeholder)


BorderStyle Constants (placeholder)


BorderStyle Property (ActiveX Controls) (placeholder)


Clear Method (ActiveX Controls) (placeholder)


Clipboard Object Constants (placeholder)


Color Constants (placeholder)


CommonDialog Control Constants (placeholder)


CommonDialog Error Constants (placeholder)


Control Constants (placeholder)


DataBindings Property (placeholder)


DDE Constants (placeholder)


Drag-and-Drop Constants (placeholder)


Drawing Constants (placeholder)


FetchVerbs Method (placeholder)


Form Constants (placeholder)


Graphics Constants (placeholder)


Grid Control Constants (placeholder)


Help Constants (placeholder)


HideSelection Property (ActiveX Controls) (placeholder)


HideSelection Property (placeholder)


Image Property (ActiveX Controls) (placeholder)


ImageList Property (ActiveX Controls) (placeholder)


Index Property (ActiveX Controls) (placeholder)


Index Property (placeholder)


Key Code Constants (placeholder)


Key Property (ActiveX Controls) (placeholder)


Menu Accelerator Constants (placeholder)


Menu Control Constants (placeholder)


Miscellaneous Constants (placeholder)


MousePointer Constants (placeholder)


OLE Container Control Constants (placeholder)


Picture Object Constants (placeholder)


Printer Object Constants (placeholder)


RasterOp Constants (placeholder)


Remove Method (ActiveX Controls) (placeholder)


ShowInTaskbar Property (placeholder)


ShowTips Property (ActiveX Controls) (placeholder)


ShowWhatsThis Method (placeholder)


Text Property (ActiveX Controls) (placeholder)


Value Property (ActiveX Controls) (placeholder)


Variant Type Constants (placeholder)


Visual Basic Constants (placeholder)


WhatsThisButton Property (placeholder)


WhatsThisHelp Property (placeholder)


WhatsThisHelpID Property (placeholder)


WhatsThisMode Method (placeholder)


Windows 95 Control Constants (placeholder)


ColIsVisible Property (placeholder)


ColPos Property (placeholder)


DataObject Object (placeholder)


DataObjectFiles Collection (placeholder)


DataSource Property (placeholder)


Drag Method (placeholder)


DrawMode Property (placeholder)


FixedAlignment Property (placeholder)


GotFocus Event (placeholder)


GridLineWidth Property (placeholder)


Index Property (Control Array) (placeholder)


LostFocus Event (placeholder)


Move Method (placeholder)


Name Property (placeholder)


Object Property (placeholder)


Parent Property (placeholder)


RowColChange Event (placeholder)


RowIsVisible Property (placeholder)


RowPos Property (placeholder)


SetFocus Method (placeholder)


ZOrder Method (placeholder)


Files Method (placeholder)


Connect Event (placeholder)


HScrollSmallChange, VScrollSmallChange Properties (placeholder)


MinHeight, MinWidth Properties (placeholder)


Property Pages Dialog Box (placeholder)


RemoteHost Property (placeholder)


RemotePort Property (placeholder)


ViewportHeight, ViewportLeft, ViewportTop, ViewportWidth Properties (placeholder)


Resync Method (Remote Data) (placeholder)


ContainedVBControls Collection (placeholder)


Member Object (placeholder)


Members Collection (placeholder)


VBComponentsEvents Object (placeholder)


VBProjectsEvents Object (placeholder)


Files Property (placeholder)


Alignment Property (placeholder)


AboutBox Method (placeholder)


Col, Row Properties (placeholder)


RowHeight Property (placeholder)


Scroll Event (placeholder)


ScrollBars Property (placeholder)


SelEndCol, SelStartCol, SelEndRow, SelStartRow Properties (placeholder)


ScrollBars Property (placeholder)


Appearance Property (ActiveX Controls) (placeholder)


BackColor, ForeColor Properties (ActiveX Controls) (placeholder)


BorderStyle Constants (ActiveX Controls) (placeholder)


Caption Property (ActiveX Controls) (placeholder)


Change Event (ActiveX Controls) (placeholder)


Clear Method (ActiveX Controls) (placeholder)


Click Event (ActiveX Controls) (placeholder)


Clipboard Object Constants (ActiveX Controls) (placeholder)


Count Property (ActiveX Controls) (placeholder)


DataObject Object (ActiveX Controls) (placeholder)


DataObjectFiles Collection (ActiveX Controls) (placeholder)


DataSource Property (ActiveX Controls) (placeholder)


DblClick Event (ActiveX Controls) (placeholder)


Drag-and-Drop Constants (ActiveX Controls) (placeholder)


Enabled Property (ActiveX Controls) (placeholder)


FetchVerbs Method (ActiveX Controls) (placeholder)


Files Method (ActiveX Controls) (placeholders)


Font Property (ActiveX Controls) (placeholder)


FontName Property (ActiveX Controls) (placeholder)


FontSize Property (ActiveX placeholder)


GetData Method (ActiveX Controls) (placeholder)


GetFormat Method (ActiveX Controls) (placeholder)


HideSelection Property (ActiveX Controls) (complaceholder)


hWnd Property (ActiveX Controls) (placeholder)


Item Method (ActiveX Controls) (placeholder)


Key Code Constants (ActiveX Controls) (placeholder)


Key Property (ActiveX Controls) (complaceholder)


KeyDown, KeyUp Events (ActiveX Controls) (placeholder)


KeyPress Event (ActiveX Controls) (placeholder)


Max, Min Properties (ActiveX Controls) (placeholder)


MouseDown, MouseUp Events (ActiveX Controls) (placeholder)


MouseIcon Property (ActiveX Controls) (placeholder)


MouseMove Event (ActiveX Controls) (placeholder)


MousePointer Constants (ActiveX Controls) (placeholder)


MousePointer Property (ActiveX Controls) (placeholder


OLECompleteDrag Event (ActiveX Controls) (placeholder)


OLEDrag Method (ActiveX Controls) (placeholder)


OLEDragDrop Event (ActiveX Controls) (placeholder)


OLEDragMode Property (ActiveX Controls) (placeholder)


OLEDragOver Event (ActiveX Controls) (placeholder)


OLEDropMode Property (ActiveX Controls) (placeholder)


OLEGiveFeedback Event (ActiveX Controls) (placeholder)


OLESetData Event (ActiveX Controls) (placeholder)


OLEStartDrag Event (ActiveX Controls) (placeholder)


Picture Property (ActiveX Controls) (placeholder)


Property Pages Dialog Box (ActiveX Controls) (placeholder)


RemoteHost Property (ActiveX Controls) (placeholder)


RemotePort Property (ActiveX Controls) (placeholder)


SelLength, SelStart, SelText Properties (ActiveX Controls) (placeholder)


SetData Method (ActiveX Controls) (placeholder)


ShowTips Property (ActiveX Controls) (complaceholder)


Text Property (ActiveX Controls) (complaceholder)


Value Property (ActiveX Controls) (complaceholder)


hDC Property (ActiveX Controls) (complaceholder)


Height, Width Properties (ActiveX Controls) (complaceholder)


Index Property (ActiveX Controls) (complaceholder)


Left, Top Properties (ActiveX Controls) (complaceholder)


Tag Property (ActiveX Controls) (complaceholder)


Visible Property (ActiveX Controls) (complaceholder)


Remove Method (ActiveX Controls) (complaceholder)


Object Property (ActiveX Controls) (placeholder)


Property Pages (ActiveX controls) (placeholder)


No fonts exist (Error 24574) (Common Dialog Control) (complaceholder)


Help Contents placeholder


BorderStyle Property (ActiveX Controls) (placeholder)


RightToLeft Property (ActiveX Controls) (placeholder)


Refresh Method (ActiveX Controls) (placeholder)